Just like backing up the CMS, the restore process is performed with Lync Server Command Shell cmdlets. If you are looking to simply restore a known good configuration, use the Import-CsConfiguration and Import-CsLisConfiguration cmdlets. However, if the CMS is offline permanently or you simply want to move the CMS to a different pool, use the Move-CsManagementServer cmdlet.
The Import-CsConfiguration cmdlet imports the Lync Server global configuration from a exported file. There are two syntaxes for the command and both are displayed in the following:
Import-CsConfiguration – Filename <string> [-Force <switchParameters>
Export-CsConfiguration –ByteInput <Byte[]>
The parameters are defined as follows:
• Filename—Path to the .zip file to be imported. You must use either the –FileName or –AsBytes flag, but you cannot use both in the same command.
• ByteInput—Imports the topology based on a byte array stored in a variable from the export-CsConfiguration cmdlet. You must use either the –FileName or –AsBytes flag, but you cannot use both in the same command.
• Force—Suppresses the display of nonfatal errors when running the command.
If you want to move the CMS or you need to in a disaster recovery scenario, you’ll use the Move-CsManagementServer cmdlet.
It is important to note that the Move-CsManagementServer cmdlet must be run from the server that becomes the new CMS owner. It cannot be run from a different system or the system where the CMS currently resides.
The syntax for the command is as follows:
Move-CsManagementServer –Confirm [<SwitchParameter>] [-CsConfiguration
<String>] [-CsLisConfiguration <String>] [-Force <switchParameter>] [-Report
<String>]
The parameters are defined as follows:
• Confirm—Prompts the user for confirmation before executing the command.
• CsConfiguration—Full path to the Lync Server .zip file created by the Export-CsConfiguration command.
• CsLisConfiguration—Full path to the Lync Server .zip file created by the Export-CsLisConfiguration command.
• Force—Forces the management server to move even if the existing database is offline. This parameter is required in a disaster recovery situation. Note that some data may be lost when using the force switch, so it should be used only as a last resort.
• Report—Creates an HTML log file at the specified location.
In a nondisaster recovery scenario where you are just moving the CMS to another server, the command is simple:
Move-CsManagementServer
However, in a disaster recovery scenario it would look more like this:
Move-CsManagementServer -CsConfiguration "C:ackupCSConfiguration.zip" -
CsLisConfiguration "C:ackupCSLisConfiguration.zip -Force -Report
"C:logsMoveCMS.html"
Of all the various restore processes, these tools are the most powerful. Armed with them, an administrator can recover from nearly any scenario.