Export (0) Print
Expand All
Expand Minimize

Set-CsNetworkSubnet

 

Topic Last Modified: 2013-03-25

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

Set-CsNetworkSubnet [-Identity <XdsGlobalRelativeIdentity>] <COMMON PARAMETERS>
Set-CsNetworkSubnet [-Instance <PSObject>] <COMMON PARAMETERS>
COMMON PARAMETERS: [-Confirm [<SwitchParameter>]] [-Description <String>] [-Force <SwitchParameter>] [-MaskBits <Int32>] [-NetworkSiteID <String>] [-WhatIf [<SwitchParameter>]]

This example modifies the subnet with the Identity (the Subnet ID) 172.11.15.0. The subnet is modified with a new MaskBits value (25) and a new NetworkSiteID (Chicago).

Set-CsNetworkSubnet -Identity 172.11.15.0 -MaskBits 25 -NetworkSiteID Chicago

Example 2 moves all subnets on the Vancouver site to the Chicago site. To do this, we begin by calling the Get-CsNetworkSubnet cmdlet. This will retrieve a collection of all subnets defined within the Lync 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 Set-CsNetworkSubnet cmdlet. We supply one parameter to the Set-CsNetworkSubnet cmdlet: NetworkSiteID. By passing the parameter a value of Chicago, we’re instructing the Set-CsNetworkSubnet cmdlet to change the network site ID of every member of the collection to Chicago.

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

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 modify the associated network site, change the description of the subnet, or modify the mask bits for the subnet.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Set-CsNetworkSubnet cmdlet locally: RTCUniversalServerAdmins. To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Set-CsNetworkSubnet"}

 

Parameter Required Type Description

Confirm

Optional

SwitchParameter

Prompts you for confirmation before executing the command.

Description

Optional

String

A description of the subnet being modified.

Force

Optional

SwitchParameter

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

Identity

Optional

XdsGlobalRelativeIdentity

The unique subnet ID of the subnet you want to modify. This value will be either an IP address (such as 174.11.12.0) or a URL beginning with http: or https:.

Instance

Optional

SubnetType

A reference to the network subnet object that you want to modify. This object must be of type Microsoft.Rtc.Management.WritableConfig.Settings.NetworkConfiguration.SubnetType, which can be retrieved by calling the Get-CsNetworkSubnet cmdlet.

MaskBits

Optional

Int32

The bitmask to be applied to the subnet.

NetworkSiteID

Optional

String

The site ID of the network site to which this subnet is to be applied. You can retrieve site IDs for your deployment by calling the Get-CsNetworkSite cmdlet.

WhatIf

Optional

SwitchParameter

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

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

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

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft