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

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.

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: