Topic Last Modified: 2013-03-25

Modifies a list of voice routes. This cmdlet was introduced in Lync Server 2010.

Syntax

Set-CsRoutingConfiguration [-Identity <XdsIdentity>] <COMMON PARAMETERS>
Set-CsRoutingConfiguration [-Instance <PSObject>] <COMMON PARAMETERS>
COMMON PARAMETERS: [-Confirm [<SwitchParameter>]] [-EnableLocationBasedRouting <$true | $false>] [-Force <SwitchParameter>] [-Route <PSListModifier>] [-WhatIf [<SwitchParameter>]]

Examples

EXAMPLE 1

It takes several steps to modify a voice route within a routing configuration. In this example, we start by retrieving the routing configuration object by calling the Get-CsRoutingConfiguration cmdlet. We assign the object retrieved (there will be only one) to the variable $a.

In line 2 of this example we retrieve the contents of the Route property from variable $a, which is a collection of voice route objects. We then pipe that collection to the Where-Object cmdlet, where we search the collection for all voice route objects with a Name matching the string LocalRoute. We assign that object to the variable $b.

Next, we modify the LocalRoute voice route object by assigning the value $False to the property SuppressCallerId. By updating that object we’ve updated the object in variable $a. However, that object is still only in memory. As a final step, we need to save those changes by passing $a to the Instance parameter of the Set-CsRoutingConfiguration cmdlet.

This is not the recommended way of modifying a routing configuration. To modify a routing configuration, simply change the individual voice routes with the Set-CsVoiceRoute cmdlet, as shown here:

Set-CsVoiceRoute -Identity LocalRoute -SuppressCallerId $False

That one line will accomplish the same task shown in Example 1.

Copy Code
$a = Get-CsRoutingConfiguration
$b = $a.Route | Where-Object {$_.Name -match "LocalRoute"}
$b.SuppressCallerId = $False
Set-CsRoutingConfiguration -Instance $a

Detailed Description

Voice routes contain instructions that tell Lync Server how to route calls from Enterprise Voice users to phone numbers on the public switched telephone network (PSTN) or a private branch exchange (PBX). With this cmdlet you can modify the settings of any voice route defined within a Lync Server deployment.

The use of this cmdlet is not recommended. To modify routing configurations, modify the individual voice routes by calling the Set-CsVoiceRoute cmdlet.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Set-CsRoutingConfiguration 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-CsRoutingConfiguration"}

Parameters

Parameter Required Type Description

Confirm

Optional

SwitchParameter

Prompts you for confirmation before executing the command.

EnableLocationBasedRouting

Optional

Boolean

When set to True, voice routing will be managed by taking into account the location of both the user placing the call and the user receiving the call. The default value is False.

Force

Optional

SwitchParameter

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

Identity

Optional

XdsIdentity

The scope of the routing configuration. This must be Global.

Instance

Optional

PstnRoutingSettings

A routing configuration (Microsoft.Rtc.Management.WritablConfig.Policy.Voice.PstnRoutingSettings) object. An object of this type can be retrieved by calling the Get-CsRoutingConfiguration cmdlet.

Route

Optional

PSListModifier

A list of all voice routes (Microsoft.Rtc.Management.WritableConfig.Policy.Voice.Route objects) defined for the Lync Server deployment.

You should modify individual voice route objects by using the Set-CsVoiceRoute cmdlet. That is the recommended way of modifying routes in this list.

WhatIf

Optional

SwitchParameter

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

Input Types

Microsoft.Rtc.WritableConfig.Management.Policy.Voice.PSTNRoutingSettings object. Accepts pipelined input of a routing configuration object.

Return Types

The Set-CsRoutingConfiguration cmdlet does not return a value or object. Instead, the cmdlet configures instances of the Microsoft.Rtc.Management.WritableConfig.Policy.Voice.PstnRoutingSettings object.

See Also