Export (0) Print
Expand All
Expand Minimize

Get-CsTrunk

Lync Server 2013
 

Topic Last Modified: 2013-02-21

Returns information about the SIP trunks employed by your organization. SIP trunks connect the Lync Server 2013 Voice over IP phone network with the Public Switched Telephone Network. This cmdlet was introduced in Lync Server 2013.

Get-CsTrunk [-Identity <XdsGlobalRelativeIdentity>] <COMMON PARAMETERS>
Get-CsTrunk [-Filter <String>] <COMMON PARAMETERS>
COMMON PARAMETERS: [-PoolFqdn <String>]

The command shown in Example 1 returns information for all the SIP trunks configured for use in your organization.

Get-CsTrunk

In Example 2, information is returned for a single SIP trunk: the trunk with the Identity PstnGateway:192.168.0.240.

Get-CsTrunk -Identity "PstnGateway:192.168.0.240"

The command shown in Example 3 returns information for all the SIP trunks found on the pool atl-cs-001.litwareinc.com.

Get-CsTrunk -PoolFqdn "atl-cs-001.litwareinc.com"

Example 4 returns information for all the routable SIP trunks. To do this, the command first calls the Get-CsTrunk cmdlet without any parameters in order to return a collection of all the available SIP trunks. This collection is then piped to the Where-Object cmdlet, which picks out only those trunks where the Routable property is equal to (-eq) True ($True).

Get-CsTrunk | Where-Object {$_.Routable -eq $True}

In Microsoft Lync Server 2010, trunks were used to route outbound calls from a Mediation Server to a PSTN gateway. Each gateway was limited to a single trunk; among other things this made it difficult for administrators to provide resiliency for outbound calls. However, because trunks and PSTN gateways were essentially identical, you could retrieve information about all your trunks by running this command:

Get-CsService -PstnGateway

In Lync Server 2013, multiple trunks can now be assigned to a single PSTN gateway; this means that gateways and trunks are no longer essentially identical. In turn, that means that, in Lync Server 2013, you cannot retrieve detailed information about individual trunks by using the Get-CsService cmdlet. Instead, detailed information about individual trunks is returned by using the new Get-CsTrunk cmdlet.

Note that, as far as the Windows PowerShell command-line interface is concerned, trunk information is read-only: you cannot create, delete or modify trunks by using PowerShell. Those operations can only be carried out by using Lync Server Topology Builder.

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-CsTrunk"}

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

 

Parameter Required Type Description

Filter

Optional

System.String

Enables you to use wildcard characters in order to return a SIP trunk (or collection of SIP trunks). For example, to return a collection of all the SIP trunks configured as part of the PSTN gateway service use this syntax:

-Filter "PstnGateway:*"

Identity

Optional

Microsoft.Rtc.Management.Xds.XdsGlobalRelativeIdentity

Unique identifier for the SIP trunk to be returned. For example:

–Identity "PstnGateway:192.168.0.240"

Note that you cannot use wildcards when specifying an Identity. If you need to use wildcards, then include the Filter parameter instead.

If this parameter is not specified, then the Get-CsTrunk cmdlet returns a collection of all the SIP trunks in use in the organization.

PoolFqdn

Optional

System.String

Fully qualified domain name for the trunk or PSTN gateway as defined in the topology. For example:

-PoolFqdn "atl-trunk-001.litwareinc.com"

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

The Get-CsTrunk cmdlet returns instances of the Microsoft.Rtc.Management.Xds.DisplayPstnGateway#Decorated object.

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft