Commands › Microsoft Teams
Set-CsOnlineVoiceRoute
Modifies an online voice route. Online voice routes contain instructions that tell Microsoft Teams how to route calls from Microsoft or Office 365 users to phone numbers on the public switched telephone network (PSTN) or a private branch exchange (PBX).
Quick start script
# Set-CsOnlineVoiceRoute — 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-CsOnlineVoiceRoute
$before | Format-List
# 3. Make the change (dry run first)
Set-CsOnlineVoiceRoute -WhatIf
Set-CsOnlineVoiceRoute
# 4. Verify and diff
$after = Get-CsOnlineVoiceRoute
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
Set-CsOnlineVoiceRoute [-BridgeSourcePhoneNumber <String>] [-Description <String>] [[-Identity] <String>]
[-NumberPattern <String>] [-OnlinePstnGatewayList <Object>] [-OnlinePstnUsages <Object>] [-Priority <Int32>]
[-WhatIf] [-Confirm] [<CommonParameters>]
Parameters (9)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.