Commands › Microsoft Teams

New-CsOnlineVoiceRoute

Microsoft Teams MicrosoftTeams New-*

Creates a new online voice route.

Quick start script

# New-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)
New-CsOnlineVoiceRoute -Identity <String> -Name <String> -WhatIf
New-CsOnlineVoiceRoute -Identity <String> -Name <String>

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

Syntax — 2 parameter sets

Identity (Default)

New-CsOnlineVoiceRoute [-Identity] <String> [-BridgeSourcePhoneNumber <String>] [-Description <String>]
 [-NumberPattern <String>] [-OnlinePstnGatewayList <Object>] [-OnlinePstnUsages <Object>] [-Priority <Int32>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

ParentAndRelativeKey

New-CsOnlineVoiceRoute [-BridgeSourcePhoneNumber <String>] [-Description <String>] [-NumberPattern <String>]
 [-OnlinePstnGatewayList <Object>] [-OnlinePstnUsages <Object>] [-Priority <Int32>]
 -Name <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (10)

ParameterTypeRequiredWhat it controls
-BridgeSourcePhoneNumber String BridgeSourcePhoneNumber is an E.164 formatted Operator Connect Conferencing phone number assigned to your Audio Conferencing Bridge. Using BridgeSourcePhoneNumber in an online voice route is mutually exclusive with...
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-Description String A description of what this online voice route is for.
-Identity String yes A name that uniquely identifies the online voice route. Voice routes can be defined only at the global scope, so the identity is simply the name you want to give the route. (You can have spaces in the route name, for...
-Name String yes The unique name of the voice route. If this parameter is set, the value will be automatically applied to the online voice route Identity. You cannot specify both an Identity and a Name.
-NumberPattern String A regular expression that specifies the phone numbers to which this route applies. Numbers matching this pattern will be routed according to the rest of the routing settings.
-OnlinePstnGatewayList PSListModifier This parameter contains a list of online gateways associated with this online voice route. Each member of this list must be the service Identity of the online PSTN gateway. The service Identity is the fully qualified...
-OnlinePstnUsages PSListModifier A list of online PSTN usages (such as Local, Long Distance, etc.) that can be applied to this online voice route. The PSTN usage must be an existing usage (PSTN usages can be retrieved by calling the...
-Priority Int32 A number could resolve to multiple online voice routes. The priority determines the order in which the routes will be applied if more than one route is possible. The lowest priority will be applied first and then in...
-WhatIf SwitchParameter Shows what would happen if the cmdlet runs. The cmdlet is not run.

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