Commands › Microsoft Teams

New-CsTenantNetworkSubnet

Microsoft Teams MicrosoftTeams New-*

Creates a new network subnet.

Quick start script

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

# 3. Make the change (dry run first)
New-CsTenantNetworkSubnet -Identity <String> -MaskBits <Int32> -SubnetID <String> -WhatIf
New-CsTenantNetworkSubnet -Identity <String> -MaskBits <Int32> -SubnetID <String>

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

Syntax — 2 parameter sets

Identity (Default)

New-CsTenantNetworkSubnet [-Identity] <string> -MaskBits <int> [-Description <string>]
 [-NetworkSiteID <string>] [-WhatIf] [-Confirm] [<CommonParameters>]

ParentAndRelativeKey

New-CsTenantNetworkSubnet -MaskBits <int> -SubnetID <string> [-Description <string>]
 [-NetworkSiteID <string>] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-Description String Provide a description of the network subnet to identify the purpose of creating it.
-Identity String yes Unique identifier for the network subnet to be created.
-MaskBits Int32 yes This parameter determines the length of bits to mask to the subnet.
-NetworkSiteID String NetworkSiteID is the identifier for the network site which the current network subnet is associating to.
-SubnetID String yes The name of the network subnet. This must be a unique and valid IPv4 or IPv6 address. You cannot specify an NetworkSubnetID and an Identity at the same time.
-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.