Commands › Microsoft Teams

Set-CsTenantNetworkSubnet

Microsoft Teams MicrosoftTeams Set-*

Changes the definition of network subnets.

Quick start script

# Set-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)
Set-CsTenantNetworkSubnet  -WhatIf
Set-CsTenantNetworkSubnet

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

Syntax

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

Parameters (6)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-Description String Provide a description of the network subnet to identify purpose of setting it.
-Identity String Unique identifier for the network subnet to be set.
-MaskBits Int32 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.
-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.