Commands › Microsoft Teams

Remove-CsMainlineAttendantSpamDetectionTemplate

Microsoft Teams MicrosoftTeams Remove-*

Deletes a Teams Phone Agent (Mainline Attendant) Spam Detection template.

Quick start script

# Remove-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
Remove-CsMainlineAttendantSpamDetectionTemplate -Identity <Guid>

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

Syntax

Remove-CsMainlineAttendantSpamDetectionTemplate -Identity <Guid> [<CommonParameters>]

Parameters (1)

ParameterTypeRequiredWhat it controls
-Identity Guid yes The Identity parameter is the unique identifier assigned to the Spam Detection template.

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