Topic Last Modified: 2013-03-07
Returns information about public switched telephone network (PSTN) usage records used in your organization. This cmdlet was introduced in Lync Server 2010.
Syntax
Get-CsPstnUsage [-Identity <XdsIdentity>]
<COMMON PARAMETERS>
|
Get-CsPstnUsage [-Filter <String>] <COMMON
PARAMETERS>
|
COMMON PARAMETERS: [-LocalStore
<SwitchParameter>]
|
Examples
EXAMPLE 1
This command returns the list of global PSTN usages available within the organization.
Copy Code | |
---|---|
Get-CsPstnUsage |
EXAMPLE 2
The command in this example returns a list of all defined PSTN usages, with one usage listed on each line of output. Calling the Get-CsPstnUsage cmdlet by itself returns the Identity and the Usage list. If the Usage list contains more than three or four entries, the list will be abbreviated in the output, similar to this:
Usage : {Internal, Local, Long Distance, International...}
Use the command in this example to display only a list of usages. The output will be similar to this:
Internal
Local
Long Distance
International
Restricted
Copy Code | |
---|---|
(Get-CsPstnUsage).Usage |
EXAMPLE 3
This command returns all the PSTN usage names that have the string "tern" somewhere within the name. For example, this command will return "Internal" and "International" but not "Local" or "Long Distance".
The first part of this command is the Get-CsPstnUsage cmdlet within parentheses, which means the first thing that happens is for all the PSTN usages to be retrieved. The .Usage property returns only the usage information for the PSTN usages, not the Identity. This list of usages is then piped to the ForEach-Object cmdlet, which looks at the usage strings one at a time. The If statement compares the current usage string to the string "*tern*" (the * are wildcards) and displays any occurrence that matches that pattern.
Copy Code | |
---|---|
(Get-CsPstnUsage).Usage | ForEach-Object {if ($_ -like "*tern*") {$_}} |
Detailed Description
PSTN usages are string values that are used for call authorization. A PSTN usage links a voice policy to a route. The Get-CsPstnUsage cmdlet retrieves the list of all PSTN usages available within an organization.
Who can run this cmdlet: By default, members of the following groups are authorized to run the Get-CsPstnUsage 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-CsPstnUsage"}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Filter |
Optional |
System.String |
The Filter parameter allows you to retrieve only those PSTN usages with an Identity matching a particular wildcard string. However, the only Identity available to PSTN usages is Global, so this parameter is not useful for this cmdlet. |
Identity |
Optional |
Microsoft.Rtc.Management.Xds.XdsIdentity |
The level at which these settings are applied. The only identity that can be applied to PSTN usages is Global. |
LocalStore |
Optional |
System.Management.Automation.SwitchParameter |
Retrieves the PSTN usage information from the local data store rather than the main Central Management store. |
Input Types
None.
Return Types
The Get-CsPstnUsage cmdlet returns instances of the Microsoft.Rtc.Management.WritableConfig.Policy.Voice.PSTNUsages object.