Commands › Microsoft Teams

Remove-CsOnlineVoicemailPolicy

Microsoft Teams MicrosoftTeams Remove-*

Deletes an existing Online Voicemail policy.

Quick start script

# Remove-CsOnlineVoicemailPolicy — 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-CsOnlineVoicemailPolicy
$before | Format-List

# 3. Make the change (dry run first)
Remove-CsOnlineVoicemailPolicy -Identity <String> -WhatIf
Remove-CsOnlineVoicemailPolicy -Identity <String>

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

Syntax

Remove-CsOnlineVoicemailPolicy [-Identity] <string> [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (3)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter Prompts you for confirmation before executing the command.
-Identity String yes A unique identifier specifying the scope, and in some cases the name, of the policy.
-WhatIf SwitchParameter Describes what would happen if you executed the command without actually executing the command.

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