Commands › Microsoft Teams

New-CsTenantNetworkSite

Microsoft Teams MicrosoftTeams New-*

As an admin, you can use the Teams PowerShell command, New-CsTenantNetworkSite to define network sites. Network sites are defined as a collection of IP subnets. Each network site must be associated with a network region. The organization's network site is used for Location-Based Routing.

Quick start script

# New-CsTenantNetworkSite — 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-CsTenantNetworkSite
$before | Format-List

# 3. Make the change (dry run first)
New-CsTenantNetworkSite -Identity <String> -NetworkSiteID <String> -WhatIf
New-CsTenantNetworkSite -Identity <String> -NetworkSiteID <String>

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

Syntax — 2 parameter sets

Identity (Default)

New-CsTenantNetworkSite [-Identity] <string> [-Description <string>] [-EmergencyCallingPolicy <string>]
 [-EmergencyCallRoutingPolicy <string>] [-EnableLocationBasedRouting <bool>] [-LocationPolicy <string>]
 [-NetworkRegionID <string>] [-NetworkRoamingPolicy <string>] [-SiteAddress <string>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

ParentAndRelativeKey

New-CsTenantNetworkSite -NetworkSiteID <string> [-Description <string>] [-EmergencyCallingPolicy <string>]
 [-EmergencyCallRoutingPolicy <string>] [-EnableLocationBasedRouting <bool>] [-LocationPolicy <string>]
 [-NetworkRegionID <string>] [-NetworkRoamingPolicy <string>] [-SiteAddress <string>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (12)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-Description String Provide a description of the network site to identify purpose of creating it.
-EmergencyCallingPolicy String This parameter is used to assign a custom emergency calling policy to a network site. For more information see [Assign a custom emergency calling policy to a network...
-EmergencyCallRoutingPolicy String This parameter is used to assign a custom emergency call routing policy to a network site. For more information, see [Assign a custom emergency call routing policy to a network...
-EnableLocationBasedRouting Boolean This parameter determines whether the current site is enabled for Location-Based Routing.
-Identity String yes Unique identifier for the network site to be created.
-LocationPolicy String This parameter is reserved for Microsoft internal use.
-NetworkRegionID String NetworkRegionID is the identifier for the network region to which the current network site is associated to.
-NetworkRoamingPolicy String NetworkRoamingPolicy is the identifier for the network roaming policy to which the network site will associate to.
-NetworkSiteID String yes The name of the network site. This must be a string that is unique. You cannot specify an NetworkSiteID and an Identity at the same time.
-SiteAddress String This parameter is not used.
-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.