Topic Last Modified: 2013-03-07

Modifies a set of strings that identify the allowed public switched telephone network (PSTN) usages. This cmdlet can be used to add usages to the list of PSTN usages or remove usages from the list. This cmdlet was introduced in Lync Server 2010.

Syntax

Set-CsPstnUsage [-Identity <XdsIdentity>] <COMMON PARAMETERS>
Set-CsPstnUsage [-Instance <PSObject>] <COMMON PARAMETERS>
COMMON PARAMETERS: [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-Usage <PSListModifier>] [-WhatIf [<SwitchParameter>]]

Examples

EXAMPLE 1

This command adds the string "International" to the current list of available PSTN usages.

Copy Code
Set-CsPstnUsage -Identity global -Usage @{add="International"}

EXAMPLE 2

This command removes the string "Local" from the list of available PSTN usages.

Copy Code
Set-CsPstnUsage -Identity global -Usage @{remove="Local"}

EXAMPLE 3

The command in this example performs the exact same action as the command in Example 2: it removes the "Local" PSTN usage. This example shows the command without the Identity parameter specified. The only Identity available to the Set-CsPstnUsage cmdlet is the Global identity; omitting the Identity parameter defaults to Global.

Copy Code
Set-CsPstnUsage -Usage @{remove="Local"}

EXAMPLE 4

This command replaces everything in the usage list with the values International and Restricted. All previously existing usages are removed.

Copy Code
Set-CsPstnUsage -Usage @{replace="International","Restricted"}

Detailed Description

PSTN usages are string values that are used for call authorization. A PSTN usage links a voice policy to a route. The Set-CsPstnUsage cmdlet is used to add or remove phone usages to or from the usage list. This list is global so it can be used by policies and routes throughout the Lync Server deployment.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Set-CsPstnUsage 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-CsPstnUsage"}

Parameters

Parameter Required Type Description

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command.

Force

Optional

System.Management.Automation.SwitchParameter

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

Identity

Optional

Microsoft.Rtc.Management.Xds.XdsIdentity

The scope at which these settings are applied. The Identity for this cmdlet is always Global.

Instance

Optional

PstnUsages

A reference to a PSTN usage object. This object must be of type PstnUsages and can be retrieved by calling the Get-CsPstnUsage cmdlet.

Usage

Optional

System.Management.Automation.PSListModifier

Contains a list of allowable usage strings. These entries can be any string value.

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

Input Types

Microsoft.Rtc.Management.WritableConfig.Policy.Voice.PstnUsages object. Accepts pipelined input of PSTN usage objects.

Return Types

This cmdlet does not return a value or object. Instead, it configures instances of the Microsoft.Rtc.Management.WritableConfig.Policy.Voice.PstnUsages object.

See Also