[This is preliminary documentation and is subject to change. Blank topics are included as placeholders.]

Removes an existing network region. Network regions are the network hubs or backbones in the configuration of call admission control (CAC) and E911.

Syntax

Remove-CsNetworkRegion -Identity <XdsGlobalRelativeIdentity> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

XdsGlobalRelativeIdentity

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.

Confirm

Optional

SwitchParameter

Prompts you for confirmation before executing the command.

WhatIf

Optional

SwitchParameter

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

Detailed Description

A network region is the hub that associates a set of sites to a central site. The central site is the datacenter site on which the bandwidth policy service is running. Use this cmdlet to remove a network region.

NOTE: A network region cannot be removed if it is associated with a site (i.e., 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: Remove-CsNetworkRegion : The key sequence 'NorthAmerica' in Keyref fails to refer to some key.

Return Types

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

Examples

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

Copy Code
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 --------------------------

Copy Code
Get-CsNetworkRegion | Where-Object {$_.CentralSite -eq "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 Microsoft Communications Server 2010 deployment. This collection is then piped to the Where-Object cmdlet. Where-Object filters this collection to return only those items (network regions) where the CentralSite value is equal to (-eq) Redmond. After narrowing the collection down to those items, this new collection is piped to Remove-CsNetworkRegion, which removes every item in that collection.

-------------------------- Example 3 --------------------------

Copy Code
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 Communications Server deployment. This collection is then piped to the Where-Object cmdlet. Where-Object 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 Set-CsNetworkSite. For each site containing the NetworkRegionID NorthAmerica we set the NetworkRegionID to Null ($null). This removes the reference to 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.