Edit

Share via


Remove-CsNetworkSubnet

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

Syntax

Default (Default)

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

Applicable: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Prompts you for confirmation before executing the command.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Applicable: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

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

Parameter properties

Type:XdsGlobalRelativeIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

Applicable: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.Rtc.Management.WritableConfig.Settings.NetworkConfiguration.SubnetType

Accepts pipelined input of network subnet objects.

Outputs

Microsoft.Rtc.Management.WritableConfig.Settings.NetworkConfiguration.SubnetType

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