Remove-CsNetworkSubnet

Removes an existing network subnet. This cmdlet was introduced in Lync Server 2010.

Syntax

Remove-CsNetworkSubnet
      [-Identity] <XdsGlobalRelativeIdentity>
      [-Force]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Each subnet must be associated with a network site for the purposes of determining the geographic location of the host belonging to this subnet. Use this cmdlet to remove a network subnet.

Examples

-------------------------- Example 1 --------------------------

Remove-CsNetworkSubnet -Identity 172.11.15.0

This example removes the subnet with the Identity (the Subnet ID) 172.11.15.0.

-------------------------- Example 2 --------------------------

Get-CsNetworkSubnet | Where-Object {$_.NetworkSiteID -eq "Vancouver"} | Remove-CsNetworkSubnet

Example 2 removes all subnets associated with the Vancouver site. To do this, we begin by calling the Get-CsNetworkSubnet cmdlet. This will retrieve a collection of all subnets defined within the Skype for Business Server deployment. This collection of subnets is then piped to the Where-Object cmdlet. The Where-Object cmdlet takes that collection and narrows it down to only those subnets with a NetworkSiteID equal to (-eq) Vancouver. Now that the collection consists only of subnets associated with the Vancouver site, we pipe the collection to the Remove-CsNetworkSubnet cmdlet, which removes every item in the collection.

Parameters

-Confirm

Prompts you for confirmation before executing the command.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Force

Suppresses any confirmation prompts that would otherwise be displayed before making changes.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Identity

The unique subnet ID of the subnet you want to remove. This value will be an IP address (such as 174.11.12.0).

Type:XdsGlobalRelativeIdentity
Position:2
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Inputs

Microsoft.Rtc.Management.WritableConfig.Settings.NetworkConfiguration.SubnetType object. Accepts pipelined input of network subnet objects.

Outputs

This cmdlet does not return a value. It removes an object of type Microsoft.Rtc.Management.WritableConfig.Settings.NetworkConfiguration.SubnetType.