Topic Last Modified: 2013-03-06

Returns information about the voice routing policies configured for use in your organization. Voice routing policies manage PSTN usages for users of hybrid voice. Hybrid voice enables users homed on Lync Online to take advantage of the Enterprise Voice capabilities available in an on-premises installation of Lync Server 2013. This cmdlet was introduced in Lync Server 2013.

Syntax

Get-CsVoiceRoutingPolicy [-Identity <XdsIdentity>] <COMMON PARAMETERS>
Get-CsVoiceRoutingPolicy [-Filter <String>] <COMMON PARAMETERS>
COMMON PARAMETERS: [-LocalStore <SwitchParameter>]

Examples

Example 1

The command shown in Example 1 returns information for all the voice routing policies configured for use in the organization.

Copy Code
Get-CsVoiceRoutingPolicy

Example 2

In Example 2, information is returned for a single voice routing policy: the policy with the Identity RedmondVoiceRoutingPolicy.

Copy Code
Get-CsVoiceRoutingPolicy -Identity "RedmondVoiceRoutingPolicy"

Example 3

The command shown in Example 3 returns information about all the voice routing policies configured at the per-user scope. To do this, the command uses the Filter parameter and the filter value "tag:*"; that filter value limits the returned data to policies that have an Identity that begins with the string value "tag:".

Copy Code
Get-CsVoiceRoutingPolicy -Filter "tag:*"

Example 4

In Example 4, information is returned only for those voice routing policies that include the PSTN usage "Long Distance". To carry out this task, the command first calls the Get-CsVoiceRoutingPolicy cmdlet without any parameters; that returns a collection of all the voice routing policies configured for use in the organization. This collection is then piped to the Where-Object cmdlet, which picks out only those policies where the PstnUsages property includes (-contains) the usage "Long Distance".

Copy Code
Get-CsVoiceRoutingPolicy | Where-Object {$_.PstnUsages -contains "Long Distance"}

Example 5

Example 5 is a variation on the command shown in Example 4; in this case, however, information is returned only for those voice routing policies that do not include the PSTN usage "Long Distance". In order to do that, the Where-Object cmdlet uses the –notcontains operator, which limits returned data to policies that do not include the usage "Long Distance".

Copy Code
Get-CsVoiceRoutingPolicy | Where-Object {$_.PstnUsages -notcontains "Long Distance"}

Detailed Description

Voice routing policies are used in "hybrid" scenarios: when some of your users are homed on the on-premises version of Lync Server and other users are homed on Lync Online. Assigning your Lync Online users a voice routing policy enables those users to receive and to place phones calls to the public switched telephone network by using your on-premises SIP trunks.

Note that simply assigning a user a voice routing policy will not enable them to make PSTN calls via Lync Online. Among other things, you will also need to enable those users for Enterprise Voice and will need to assign them an appropriate voice policy and dial plan.

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 command-line interface prompt:

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

Lync Server Control Panel: The functions carried out by the Get-CsVoiceRoutingPolicy cmdlet are not available in the Lync Server Control Panel.

Parameters

Parameter Required Type Description

Filter

Optional

System.String

Enables you to use wildcards when retrieving one or more voice routing policies. For example, to return all the policies configured at the per-user scope, use this syntax:

-Filter "tag:*"

Identity

Optional

Microsoft.Rtc.Management.Xds.XdsIdentity

Unique identifier of the voice routing policy to be retrieved. To return the global policy, use this syntax:

-Identity global

To return a policy configured at the per-user scope, use syntax like this:

-Identity "RedmondVoiceRoutingPolicy"

You cannot use wildcard characters when specifying the Identity.

If neither the Identity nor the Filter parameters are specified, then the Get-CsVoiceRoutingPolicy cmdlet returns all the voice routing policies configured for use in the organization.

LocalStore

Optional

System.Management.Automation.SwitchParameter

Retrieves the voice policy data from the local replica of the Central Management store rather than from the Central Management store itself.

Input Types

None. The Get-CsVoiceRoutingPolicy cmdlet does not accept pipelined input.

Return Types

The Get-CsVoiceRoutingPolicy cmdlet returns instances of the Microsoft.Rtc.Management.WritableConfig.Policy.Voice.VoiceRoutingPolicy object.

See Also