Get-CsVoiceRoutingPolicy

 

Topic Last Modified: 2015-12-07

Use the Get-CsVoiceRoutingPolicy cmdlet to return information about the voice routing policies configured for use in your organization. In Skype for Business Online, voice routing policies are used to determine if users can make international calls as well as taking advantage of the other Enterprise Voice capabilities available in an on-premises installation of Skype for Business Server 2015.

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

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

Get-CsVoiceRoutingPolicy

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

Get-CsVoiceRoutingPolicy -Identity "RedmondVoiceRoutingPolicy"

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:".

Get-CsVoiceRoutingPolicy -Filter "tag:*"

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".

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

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".

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

Voice routing policies are used in "hybrid" scenarios: when some of your users are homed on the on-premises version of Skype for Business Server 2015 and other users are homed on Skype for Business Online.

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

The functions carried out by the Get-CsVoiceRoutingPolicy cmdlet are not available in the Skype for Business Server Control Panel.

Skype for Business Online supports two predefined routing policies. One allows international calls and the other doesn't. They are named respectively InternationalCallsAllowed, and InternationalCallsDisallowed. Granting one of these policies to a user will either allow or disallow international calling for that user.

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.

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

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

 
Show: