Commands › Microsoft Teams
New-CsOnlinePSTNGateway
Creates a new Session Border Controller (SBC) Configuration that describes the settings for the peer entity. This cmdlet was introduced with Microsoft Phone System Direct Routing.
Quick start script
# New-CsOnlinePSTNGateway — 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-CsOnlinePSTNGateway
$before | Format-List
# 3. Make the change (dry run first)
New-CsOnlinePSTNGateway -Fqdn <String> -Identity <String> -SipSignalingPort <Int32> -WhatIf
New-CsOnlinePSTNGateway -Fqdn <String> -Identity <String> -SipSignalingPort <Int32>
# 4. Verify and diff
$after = Get-CsOnlinePSTNGateway
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax — 2 parameter sets
Identity (Default)
New-CsOnlinePSTNGateway [-Identity] <string> -SipSignalingPort <int>
[-BypassMode <string>]
[-Confirm]
[-Description <string>]
[-Enabled <boolean>]
[-FailoverResponseCodes <string>]
[-FailoverTimeSeconds <int>]
[-ForwardCallHistory <boolean>]
[-ForwardPai <boolean>]
[-GatewayLbrEnabledUserOverride <boolean>]
[-GatewaySiteId <string>]
[-GatewaySiteLbrEnabled <boolean>]
[-IPAddressVersion <string>]
[-InboundPstnNumberTranslationRules <Object>]
[-InboundTeamsNumberTranslationRules <Object>]
[-MaxConcurrentSessions <int>]
[-MediaBypass <boolean>]
[-MediaRelayRoutingLocationOverride <string>]
[-OutboundPstnNumberTranslationRules <Object>]
[-OutboundTeamsNumberTranslationRules <Object>]
[-PidfLoSupported <boolean>]
[-ProxySbc <string>]
[-SendSipOptions <boolean>]
[-WhatIf]
[<CommonParameters>]
ParentAndRelativeKey
New-CsOnlinePSTNGateway -Fqdn <string> -SipSignalingPort <int>
[-BypassMode <string>]
[-Confirm]
[-Description <string>]
[-Enabled <boolean>]
[-FailoverResponseCodes <string>]
[-FailoverTimeSeconds <int>]
[-ForwardCallHistory <boolean>]
[-ForwardPai <boolean>]
[-GatewayLbrEnabledUserOverride <boolean>]
[-GatewaySiteId <string>]
[-GatewaySiteLbrEnabled <boolean>]
[-IPAddressVersion <string>]
[-InboundPstnNumberTranslationRules <Object>]
[-InboundTeamsNumberTranslationRules <Object>]
[-MaxConcurrentSessions <int>]
[-MediaBypass <boolean>]
[-MediaRelayRoutingLocationOverride <string>]
[-OutboundPstnNumberTranslationRules <Object>]
[-OutboundTeamsNumberTranslationRules <Object>]
[-PidfLoSupported <boolean>]
[-ProxySbc <string>]
[-SendSipOptions <boolean>]
[-WhatIf]
[<CommonParameters>]
Parameters (26)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.