Dedeployment Lync2010 Part 1 Central Management Store

After we have published the new topology we are now ready to remove Lync frontend server.
We open Powershell and start with this command
This to find out all the information about the trusted application.
The we shall remove the trusted application with this command
Remove-CsTrustedApplication -Identity "FQDN/urn"
Then answer Y to do this.

Then we have to move CMS to the new server, but first we need to install the database on our SQL.
This is the command for this:
Install-CsDatebase -CentralmanagementStore - SQLserverFQDN <fqdn for SQL> -SqlInstanceName <example. RTC"
When this is done succesfully  then we have to enable-topology

We can now move the CMS by this command:

Then it gives you Current State and Proposed State
If this is what you want to do then press Yes or All.

When done, then we have to run local setup on the old Lync2010 server that are no longer defined in the topology.

When we have done this, then we will need to restart the Lync2010 server.
---------------------time for a coffee-----------------------
When we are back and we will now check the replication status, this is done by this command

Then we run also this command

Both of this shall get the status "false".
Then we will uninstall the old database:

 Then we have remove it and there is time for another coffee.

In Part 2 we will take care of the conferenceing directory.