Commands › Microsoft Teams
Set-CsOnlineVoiceRoutingPolicy
Modifies an existing online voice routing policy. Online voice routing policies manage online PSTN usages for Phone System users. For more details, please refer to the article Voice routing policy considerations.
Quick start script
# Set-CsOnlineVoiceRoutingPolicy — 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-CsOnlineVoiceRoutingPolicy
$before | Format-List
# 3. Make the change (dry run first)
Set-CsOnlineVoiceRoutingPolicy -WhatIf
Set-CsOnlineVoiceRoutingPolicy
# 4. Verify and diff
$after = Get-CsOnlineVoiceRoutingPolicy
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
Set-CsOnlineVoiceRoutingPolicy [[-Identity] <string>] [-Description <string>]
[-OnlinePstnUsages <Object>] [-RouteType <string>]
[-WhatIf] [-Confirm] [<CommonParameters>]
Parameters (6)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.