Steps to completely uninstall/remove an already existing lync 2010/2013 deployment

At times we might run into a situation where we would need to remove all the server roles , remove the features and front end roles in our lync environment  like a disaster recovery scenario, a lync server upgrade.

In this article we will have a look at the steps to decommission the lync servers in a existing deployment.

Based on my experience, i have gathered few steps which would be useful to troubleshoot in these kinds of scenarios.

1) Disable all users that are enabled for Lync Server and conferencing directories.

Probably you can run the below commands

Get-CSuser | Disable-CSuser

Get-CsConferenceDirectory | Remove-CsConferenceDirectory

2)  Remove Exchange Unified Messaging (UM) Contact Objects

Get-CsExUmContact -Filter {RegistrarPool -eq “LyncServerPoolFqdn”} | Remove-CsExUmContact

3) Remove Response Group Service Workflow Contact Objects

Get-CsRgsWorkflow -Identity:Service:ApplicationServer:LyncServerPoolFqdn | Remove-CsRgsWorkflow

4) Remove Dial-in Conferencing Access Number Contact Objects

Get-CsDialInConferencingAccessNumber | where {$_.Pool -eq “LyncServerPoolFqdn”} | Remove- CsDialInConferencingAccessNumber

5) Reassign the PSTN Gateway

Set-CsPstnGateway -Identity “PstnGateway:Xds Identity of PSTN Gateway” -MediationServer:”MediationServer: Name of Mediation Server Identity”

6) Confirm that a Front End Pool or Front End Server is Vacant

Get-CsVoiceRoute | select Identity,PstnGatewayList

7) Delete all the server roles in the topology, and then publish the final, empty topology.

Log on to the computer where Topology Builder is installed.
Start Topology Builder: Click Start, click All Programs, click Microsoft Lync Server 2010, and then click Lync Server Topology Builder.
In the Actions pane, click Remove Deployment.
Read the information regarding Remove Deployment
Click Next, and then click Finish.

Once the above is done you can open topology builder and publish the empty topology by choosing the option Download Topology from existing deployment.

8) Uninstall all Lync related SQL database.

Uninstall-CsDatabase -DatabaseType User -SqlServerFqdn[-SqlInstanceName <instance name>]

9) Run “Remove-CsConfigurationStoreLocation” to remove the Central Management store service control point (SCP) for the existing Central Management store in Active Directory Domain Services (AD DS).

Remove the Central Management Store Service Control Point in Active Directory Domain Services (Optional)

10) Unprep the domain.


Disable-CsAdDomain -Domain -GlobalSettingsDomainController -Force

11) Unprep the forest.


Disable-CsAdForest -Force -GroupDomain

After doing the above, you should be able to start a new deployment.


Sathish Veerapandian

MVP – Exchange Server 

2 thoughts on “Steps to completely uninstall/remove an already existing lync 2010/2013 deployment

  1. Joe Smith July 6, 2020 at 8:40 pm Reply

    Step 8 you don’t need the brackets, fails w/ them works without them.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: