Publish-CsTopology

 

Topic Last Modified: 2012-03-25

Publishes the Microsoft Lync Server 2010 topology retrieved by using the Get-CsTopology cmdlet.

Syntax

Publish-CsTopology -FileName <String> [-BackupFileName <String>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-GlobalCatalog <Fqdn>] [-GlobalSettingsDomainController <Fqdn>] [-Report <String>] [-WhatIf [<SwitchParameter>]]

Publish-CsTopology -Document <XElement> [-BackupFileName <String>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-GlobalCatalog <Fqdn>] [-GlobalSettingsDomainController <Fqdn>] [-Report <String>] [-WhatIf [<SwitchParameter>]]

Publish-CsTopology -FinalizeUninstall <SwitchParameter> [-BackupFileName <String>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-GlobalCatalog <Fqdn>] [-GlobalSettingsDomainController <Fqdn>] [-Report <String>] [-WhatIf [<SwitchParameter>]]

Detailed Description

After you have installed Lync Server 2010, 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 Publish-CsTopology. The only thing you can do with Publish-CsTopology 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 Publish-CsTopology. 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 Set-CsSetupPermission, then only a domain administrator will be able to publish a topology through Topology Builder.

Parameters

Parameter Required Type Description

FileName

Required

String

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

BackupFileName

Optional

String

Full path to the backup file automatically created when you run Publish-CsTopology. If this parameter is not specified, then Publish-CsTopology 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).

Document

Optional

System.XML.Linq.XElement object

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.

FinalizeUninstall

Optional

Switch Parameter

Used only when uninstall Lync Server 2010.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.

GlobalCatalog

Optional

String

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

GlobalSettingsDomainController

Optional

String

FQDN of a domain controller where global settings are stored. If global settings are stored in the System container in Active Directory Domain Services (AD DS), 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.

SkipPrepareCheck

Optional

Boolean

If set to True ($True) Publish-CsTopology will skip its initial preparation check.

Force

Optional

Switch Parameter

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

Report

Optional

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

Switch Parameter

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

Confirm

Optional

Switch Parameter

Prompts you for confirmation before executing the command.

Input Types

None. Publish-CsTopology does not accept pipelined input.

Return Types

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

Example

-------------------------- Example 1 --------------------------

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

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 Get-CsTopology 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 Publish-CsTopology to republish the newly retrieved topology.