Export (0) Print
Expand All
Expand Minimize

Set-CsRoutingConfiguration

 

Topic Last Modified: 2012-03-26

Modifies a list of voice routes.

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

Voice routes contain instructions that tell Microsoft Lync Server 2010 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 2010 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"}

 

Parameter Required Type Description

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 Get-CsRoutingConfiguration.

Route

Optional

Route

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.

Force

Optional

SwitchParameter

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

WhatIf

Optional

SwitchParameter

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

Confirm

Optional

SwitchParameter

Prompts you for confirmation before executing the command.

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

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

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

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

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 Get-CsRoutingConfiguration. 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 Set-CsRoutingConfiguration.

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 property, as shown here:

Set-CsVoiceRoute -Identity LocalRoute -SuppressCallerId $False

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

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