Topic Last Modified: 2013-02-21

Publishes the Lync Server topology retrieved by using the Get-CsTopology cmdlet. This cmdlet was introduced in Lync Server 2010.

Syntax

Publish-CsTopology -FileName <String> <COMMON PARAMETERS>
Publish-CsTopology -Document <XElement> <COMMON PARAMETERS>
Publish-CsTopology -FinalizeUninstall <SwitchParameter> <COMMON PARAMETERS>
COMMON PARAMETERS: [-BackupFileName <String>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-GlobalCatalog <Fqdn>] [-GlobalSettingsDomainController <Fqdn>] [-Report <String>] [-WhatIf [<SwitchParameter>]]

Examples

EXAMPLE 1

The commands shown in Example 1 retrieve and then republish the current topology. To carry out these tasks, the first command in the example uses the Get-CsTopology cmdlet and the AsXml parameter to retrieve the current topology; the Windows PowerShell redirection symbol > is then used to save the retrieved data to a file named C:\Topologies\Topology.xml. (Note, too, that the ToString method is used to convert the retrieved topology to a string value.) The second command in the example then uses the Publish-CsTopology cmdlet to republish the newly retrieved topology.

Copy Code
(Get-CsTopology -AsXml).ToString() > C:\Topologies\Topology.xml 
Publish-CsTopology -FileName "C:\Topologies\Topology.xml"

Detailed Description

After you have installed Lync Server, you will eventually need to make changes to the Lync Server infrastructure; for example, you might need to add a new site, delete an existing Registrar pool, or add an additional Archiving Server. These infrastructure changes must be made by using Topology Builder. After you have made the changes in Topology Builder, you can then publish and enable those changes using that same tool. These latter two steps are very important: although you can make as many modifications as you want using the Topology Builder, those modifications do not actually take effect, and your Lync Server infrastructure will not actually change, until the modifications have been published and the new topology has been enabled.

When changes are published, the new information (for example, a new site or a new server role) is written to the Central Management store. However, these new (or the newly modified) objects do not immediately join your topology; that occurs only when the updated topology has been enabled. If you select the Publish option in Topology Builder both of these steps will take place: the changes will be published (written to the Central Management store) and then the new topology will be enabled.

The Publish-CsTopology cmdlet is no longer the recommended way to publish topologies created by using Topology Builder; instead, publishing should be done within Topology Builder, using the steps outlined in the previous paragraph. This is because Topology Builder now uses the Topology Builder XML file format (.tbxml); this file format cannot be published by using the Publish-CsTopology cmdlet. The only thing you can do with the Publish-CsTopology cmdlet is republish a topology retrieved by using the Get-CsTopology cmdlet. After publishing the topology in this manner, you will then need to reconfigure your simple URLs.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Publish-CsTopology cmdlet: RTCUniversalServerAdmins. However, if setup permissions have not been delegated then you must be a domain administrator in order to run the Publish-CsTopology cmdlet. In order to give RTCUniversalServerAdmins the right to actually use the Publish-CsTopology cmdlet, you must run the Grant-CsSetupPermission cmdlet against every Active Directory container that contains computers running Lync Server services. Note that this restriction also applies to enabling a topology through Topology Builder. If you have not delegated permissions by using the Set-CsSetupPermission cmdlet, then only a domain administrator will be able to publish a topology through Topology Builder.

Parameters

Parameter Required Type Description

Document

Required

System.Xml.Linq.XElement

Enables you to publish an XML element rather than an XML file. This XML element must be configured as a System.XML.Linq.XElement object.

FileName

Required

System.String

Full path to the XML file containing the new topology information.

FinalizeUninstall

Required

System.Management.Automation.SwitchParameter

Used only when uninstall Lync Server.After the Central Management Server has been removed, use Publish-CsTopology and the FinalizeUninstall parameter to publish an empty topology. Among other things, this removes all the Active Directory entries for the Central Management Server.

BackupFileName

Optional

System.String

Full path to the backup file automatically created when you run the Publish-CsTopology cmdlet. If this parameter is not specified, then the Publish-CsTopology cmdlet will create a backup file in your Temp folder (%temp%) similar to this: Publish-CsTopology-Backup-[2010_10_01][08_30_00]. In that file name, 2010_10_01 represents the date that publication took place: year (2010), month (10), and day (01). In addition, 08_30_00 represents the time of day when publication took place: hour (08), minutes (30), and seconds (00).

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command.

Force

Optional

System.Management.Automation.SwitchParameter

Suppresses the display of any non-fatal error message that might occur when running the command.

GlobalCatalog

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

Fully qualified domain name (FQDN) of a global catalog server in your domain. This parameter is not required if you are running the Publish-CsTopology cmdlet on a computer with an account in your domain.

GlobalSettingsDomainController

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

FQDN of a domain controller where global settings are stored. If global settings are stored in the System container in Active Directory Domain Services, then this parameter must point to the root domain controller. If global settings are stored in the Configuration container, then any domain controller can be used and this parameter can be omitted.

Report

Optional

System.String

Enables you to specify a file path for the log file created when the cmdlet runs. For example: -Report "C:\Logs\Publish_Topology.html"

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

Input Types

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

Return Types

None. Instead, the Publish-CsTopology cmdleeet publishes instances of the Microsoft.Rtc.Management.Deploy.Internal.DefaultTopology object.

See Also