Topic Last Modified: 2013-03-06
Returns information about the voice routes configured for use in an organization. This cmdlet was introduced in Lync Server 2010.
Syntax
Get-CsVoiceRoute [-Identity
<XdsGlobalRelativeIdentity>] <COMMON PARAMETERS>
|
Get-CsVoiceRoute [-Filter <String>] <COMMON
PARAMETERS>
|
COMMON PARAMETERS: [-LocalStore
<SwitchParameter>]
|
Examples
EXAMPLE 1
Retrieves the properties for all voice routes defined within the organization.
Copy Code | |
---|---|
Get-CsVoiceRoute |
EXAMPLE 2
Retrieves the properties for the Route1 voice route.
Copy Code | |
---|---|
Get-CsVoiceRoute -Identity Route1 |
EXAMPLE 3
This command displays voice route settings where the Identity contains the string "test" anywhere within the value. To find the string test only at the end of the Identity, use the value *test. Similarly, to find the string test only if it occurs at the beginning of the Identity, specify the value test*.
Copy Code | |
---|---|
Get-CsVoiceRoute -Filter *test* |
EXAMPLE 4
This command retrieves all voice routes that have not had any PSTN gateways assigned. First all voice routes are retrieved using the Get-CsVoiceRoute cmdlet. These voice routes are then piped to the Where-Object cmdlet. The Where-Object cmdlet narrows down the results of the Get operation. In this case we look at each voice route (that’s what the $_ represents) and check the Count property of the PstnGatewayList property. If the count of PSTN gateways is 0, the list is empty and no gateways have been defined for the route.
Copy Code | |
---|---|
Get-CsVoiceRoute | Where-Object {$_.PstnGatewayList.Count -eq 0} |
Detailed Description
Use this cmdlet to retrieve one or more existing voice routes. Voices 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).
This cmdlet can be used to retrieve voice route information such as which PSTN gateways the route is associated with (if any), which PSTN usages are associated with the route, the pattern (in the form of a regular expression) that identifies the phone numbers to which the route applies, and caller ID settings. The PSTN usage associates the voice route to a voice policy.
Who can run this cmdlet: By default, members of the following groups are authorized to run the Get-CsVoiceRoute cmdlet locally: RTCUniversalUserAdmins, 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 "Get-CsVoiceRoute"}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Filter |
Optional |
System.String |
This parameter filters the results of the Get operation based on the wildcard value passed to this parameter. |
Identity |
Optional |
Microsoft.Rtc.Management.Xds.XdsGlobalRelativeIdentity |
A string that uniquely identifies the voice route. If no identity is provided, all voice routes for the organization are returned. |
LocalStore |
Optional |
System.Management.Automation.SwitchParameter |
Retrieves the voice route from the local replica of the Central Management store, rather than the Central Management store itself. |
Input Types
None.
Return Types
This cmdlet returns instances of the Microsoft.Rtc.Management.WritableConfig.Policy.Voice.Route object.