Topic Last Modified: 2013-02-21

Returns information about your Lync Server infrastructure, including internal domains, sites, clusters, computers, services, and back-end instances of SQL Server. This cmdlet was introduced in Lync Server 2010.

Syntax

Get-CsTopology [-AsXml <SwitchParameter>] [-LocalStore <SwitchParameter>]

Examples

EXAMPLE 1

Example 1 returns complete details for your Lync Server topology. This is done by calling the Get-CsTopology cmdlet without any additional parameters.

Copy Code
Get-CsTopology

EXAMPLE 2

Example 2 returns information about the computers found in your Lync Server topology. To do this, the command first calls the Get-CsTopology cmdlet to return the complete Lync Server topology. This information is then piped to the Select-Object cmdlet, which uses the ExpandProperty parameter to extract and display detailed information for all the computers included in that topology.

Copy Code
Get-CsTopology | Select-Object -ExpandProperty Machines

EXAMPLE 3

The command shown in Example 3 returns information about your Lync Server topology and then saves that information to an XML file. To carry out this task, the command first calls the Get-CsTopology cmdlet, along with the AsXml parameter; that causes the data to be returned as formatted XML. That formatted data is then piped to the Out-File cmdlet, which saves the information to the file C:\Logs\Topology.xml.

Copy Code
Get-CsTopology -AsXML | Out-File C:\Logs\Topology.xml

Detailed Description

The Get-CsTopology cmdlet returns information about how Lync Server has been set up and configured. Called without any additional parameters, the cmdlet provides an overview of your Lync Server infrastructure; in that scenario, the cmdlet gives you an overall view of such things as your domains, your sites, and the computers running Lync Server services and server roles. Alternatively, you can pass the output of the Get-CsTopology cmdlet to the Select-Object cmdlet; this enables you to access detailed information about a portion of your topology. For example, the following command provides detailed information regarding the SQL Server instances used by Lync Server:

Get-CsTopology | Select-Object –ExpandProperty SqlInstances

You can also use the AsXml parameter to return detailed information about your entire topology in XML format.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Get-CsTopology cmdlet locally: RTCUniversalUserAdmins, RTCUniversalServerAdmins.

Parameters

Parameter Required Type Description

AsXml

Optional

System.Management.Automation.SwitchParameter

Returns topology information in XML format. By combining the Get-CsTopology cmdlet, the AsXml parameter, and the Out-File cmdlet, you can export your topology to an XML file.

LocalStore

Optional

System.Management.Automation.SwitchParameter

Retrieves the topology data from the local replica of the Central Management store rather than from the Central Management store itself.

Input Types

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

Return Types

The Get-CsTopology cmdlet returns instances of the Microsoft.Rtc.Management.Deploy.Internal.DefaultTopology object.

See Also