Commands › Microsoft Teams

New-CsMainlineAttendantSpamDetectionTemplate

Microsoft Teams MicrosoftTeams New-*

The New-CsMainlineAttendantSpamDetectionTemplate cmdlet creates a new spam detection template.

Quick start script

# New-CsMainlineAttendantSpamDetectionTemplate — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-CsMainlineAttendantSpamDetectionTemplate
$before | Format-List

# 3. Make the change
New-CsMainlineAttendantSpamDetectionTemplate -Name <String> -Description <String> -EnableSpamDetection <Boolean>

# 4. Verify and diff
$after = Get-CsMainlineAttendantSpamDetectionTemplate
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

New-CsMainlineAttendantSpamDetectionTemplate -Name <string> -Description <string> -EnableSpamDetection <Boolean> -Action <String> [-CallTarget <String>] [-InclusionScope <list>] [-ExclusionScope <list>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-Name String yes The name of the spam detection template.
-Description String yes The description for the spam detection template.
-EnableSpamDetection Boolean yes Is spam detection enabled for this template.
-Action String yes The action to take if the call is spam.
-CallTarget String The call target when `-Action` is set to `TransferCallToTarget`.
-InclusionScope List A list of e.164 formatted phone numbers that will always be considered as spam.
-ExclusionScope List A list of e.164 formatted phone numbers that will never be considered as spam.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.