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

Modifies the settings for an existing static route.

Syntax

Set-CsStaticRoutingConfiguration [-Identity <XdsIdentity>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-Route <PSListModifier>] [-WhatIf [<SwitchParameter>]]
Set-CsStaticRoutingConfiguration [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-Instance <PSObject>] [-Route <PSListModifier>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Optional

Xds Identity

Unique identifier of the static routing configuration collection to be modified. To modify the global collection, use this syntax: -Identity global. To modify a collection applied to the service scope, use syntax similar to this: -Identity "service:Registrar:atl-cs-001.litwareinc.com". You cannot use wildcards when specifying the Identity.

If this parameter is not included Set-CsStaticRoutingConfiguration will automatically modify the global collection.

Instance

Optional

RoutingSettings object

Allows you to pass a reference to an object to the cmdlet rather than set individual parameter values.

Route

Optional

PS List Modifier

Individual static routes maintained within the collection. Routes to be added to a collection must either be copied from another collection or created using the New-CsStaticRoute cmdlet; to delete a route from a collection, you must first created an object reference to that route. See the Examples section of this help topic for more information.

Force

Optional

Switch Parameter

Suppresses the display of any non-fatal error message that might arise when running the command.

WhatIf

Optional

Switch Parameter

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

Confirm

Optional

Switch Parameter

Prompts you for confirmation before executing the command.

Detailed Description

When you send a SIP (Session Initiation Protocol) message to someone that message might need to traverse multiple subnets and networks before it is delivered; the path traveled by the message is often referred to as a route. In networking, there are two types of routes: dynamic and static. With dynamic routing, servers use algorithms to determine the next location (the next hop) where a message should be forwarded. With static routing, message paths are predetermined by system administrators. When a message is received by a server, the server checks the message address and then forwards the message to the next hop server that has been preconfigured by an administrator. If configured correctly, static routes help ensure timely, and accurate, delivery of messages, and with minimal overheard placed on servers. The downside to static routes? Messages are not dynamically rerouted in the event of a network failure.

When you install Microsoft Communications Server “14”, a global collection of static routes is automatically created for you. (The collection is created, but there are no routes assigned to that collection.) In addition, the software enables you to create additional collections applied to the service scope (these new collections can only be assigned to the Registrar service). The Set-CsStaticRoutingConfiguration cmdlet enables you to modify the property values of an existing static routing collection. This means that you can use the cmdlet to add new routes to a collection, or to delete existing routes from a collection.

Return Types

Set-CsStaticRoutingConfiguration does not return a value or object. Instead, the cmdlet configures instances of the Microsoft.Rtc.Management.WriteableConfig.Settings.SipProxy.RoutingSettings object.

Examples

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

Copy Code
$x = Get-CsStaticRoutingConfiguration -Identity global | Select-Object -ExpandProperty Route | Where-Object {$_.MatchUri -eq "litwareinc.com" -and $_.MatchOnlyPhoneUri -eq $True}

Set-CsStaticRoutingConfiguration -Identity service:Registrar:atl-cs-001.litwareinc.com -Route @{Add=$x}

The commands shown in Example 1 copy a route from the global static routing collection and then assign that route to a second static routing collection (the one with the Identity service:Registrar:atl-cs-001.litwareinc.com). To carry out this task, the first command in the example connects to the global collection and returns an object reference to the route with the MatchUri litwareinc.com and a MatchOnlyPhoneUri equal (-eq) to True ($True). To do this, the command calls Get-CsStaticRoutingConfiguration to return information from the global routing static configuration collection. This data is then piped to the Select-Object cmdlet, which uses the –ExpandProperty parameter to expand the values in the Route property. These expanded values (which are simply the individual routes assigned to the collection) are then piped to the where-Object cmdlet, which picks out only the one route where the MarchUri property is equal to litwareinc.com and the MatchOnlyPhoneUri property is equal to True. The returned route is stored in a variable named $x.

After the route has been retrieved, the second command in the example adds that route to the service: Registrar:atl-cs-001.litwareinc.com collection. To do this, Set-CsStaticRoutingConfiguration is called along with the –Route parameter; the parameter value @{Add=$x} tells Set-CsStaticRoutingConfiguration to append the route stored in the variable $x to the collection of routes maintained in the Route property.

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

Copy Code
$x = Get-CsStaticRoutingConfiguration -Identity service:Registrar:atl-cs-001.litwareinc.com | Select-Object -ExpandProperty Route | Where-Object {$_.MatchUri -eq "litwareinc.com" -and $_.MatchOnlyPhoneUri -eq $True}

Set-CsStaticRoutingConfiguration -Identity service:Registrar:atl-cs-001.litwareinc.com -Route @{Remove=$x}

The preceding commands delete a route from a static routing collection. To do this, the first command in the example connects to the collection with the Identity service:Registrar:atl-cs-001.litwareinc.com and returns an object reference to the route with the MatchUri litwareinc.com and a MatchOnlyPhoneUri equal (-eq) to True ($True). To do that, the command calls Get-CsStaticRoutingConfiguration to return information from the service:Registrar:atl-cs-001.litwareinc.com collection. This data is then piped to the Select-Object cmdlet, which uses the –ExpandProperty parameter to expand the values in the Route property. These expanded values (which are simply the individual routes assigned to the collection) are then piped to the where-Object cmdlet, which picks out only the one route where the MarchUri property is equal to litwareinc.com and the MatchOnlyPhoneUri property is equal to True. The returned route in then stored in a variable named $x.

After the route has been retrieved, the second command deletes that route from the collection. To do this, Set-CsStaticRoutingConfiguration is called along with the –Route parameter; the parameter value @{Remove=$x} tells Set-CsStaticRoutingConfiguration to delete the route specified by the variable $x.

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

Copy Code
Set-CsStaticRoutingConfiguration -Identity service:Registrar:atl-cs-001.litwareinc.com -Route $Null

Example 3 shows how you can remove all the routes assigned to a static routing configuration collection. To do this, simply include the –Route parameter and set the parameter value to null ($Null). After the command completes, the collection will still exist, but it will no longer have any routes assigned to it.