Remove-CsNetworkRegion
Removes an existing network region. Network regions represent network hubs or backbones in an enterprise network. This cmdlet was introduced in Lync Server 2010.
Syntax
Default (Default)
Remove-CsNetworkRegion
[-Identity] <XdsGlobalRelativeIdentity>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
A network region interconnects various parts of a network across multiple geographic areas. Every network region must be associated with a central site. The central site is the data center site on which the bandwidth policy service is running. Use this cmdlet to remove a network region.
Note that a network region cannot be removed if it is associated with a network site (in other words, the NetworkRegionID of any site is equal to the Identity of the region). If you attempt to remove a region associated with a site you'll receive an error message.
Examples
Example 1
Remove-CsNetworkRegion -Identity NorthAmerica
Example 1 removes the network region with the Identity NorthAmerica. Because identities are unique this command removes only one network region.
Example 2
Get-CsNetworkRegion | Where-Object {$_.CentralSite -eq "site:Redmond"} | Remove-CsNetworkRegion
This example removes all network regions associated with the central site Redmond.
The command begins by calling the Get-CsNetworkRegion
cmdlet, with no parameters, to retrieve a collection of all network regions defined for the Skype for Business Server deployment.
This collection is then piped to the Where-Object
cmdlet.
The Where-Object
cmdlet filters this collection to return only those items (network regions) where the CentralSite value is equal to (-eq) site:Redmond.
After narrowing the collection down to those items, this new collection is piped to the Remove-CsNetworkRegion
cmdlet, which removes every item in that collection.
Example 3
Get-CsNetworkSite | Where-Object {$_.NetworkRegionID -eq "NorthAmerica"} | Set-CsNetworkSite -NetworkRegionID $null -BypassID $null
Remove-CsNetworkRegion -Identity "NorthAmerica"
This example removes the network region with the Identity NorthAmerica. However, a region cannot be removed if it is associated with a site. So this example first removes any association between the NorthAmerica region and a site.
The example begins by calling the Get-CsNetworkSite
cmdlet, with no parameters, to retrieve a collection of all network sites defined for the Skype for Business Server deployment.
This collection is then piped to the Where-Object
cmdlet.
The Where-Object
cmdlet filters this collection to return only those items (network sites) where the NetworkRegionID value is equal to (-eq) NorthAmerica.
After narrowing the collection down to those items, this new collection is piped to the Set-CsNetworkSite
cmdlet.
For each site containing the NetworkRegionID NorthAmerica, we set the NetworkRegionID to Null ($null).
This removes the reference to the region on that site.
However, a site can't have a bypass ID if it isn't associated with a site.
So in addition to removing the reference to the region by setting the NetworkRegionID to Null, we must also remove the bypass association by setting BypassID to Null.
After line 1 completes, any site that was associated with the NorthAmerica region is no longer tied to a region or to any bypass settings. At this point we can call line 2, which removes the network region.
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 identifier of the network region you want to remove. The Identity will be in the form of a string that uniquely identifies that region.
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.NetworkRegionType
Accepts pipelined input of network region objects.
Outputs
Microsoft.Rtc.Management.WritableConfig.Settings.NetworkConfiguration.NetworkRegionType
This cmdlet does not return a value. It removes an object of type Microsoft.Rtc.Management.WritableConfig.Settings.NetworkConfiguration.NetworkRegionType.