So, I’m starting a new series of posts called “Preparing for Teams” and how I’m helping my customers transition from Lync 2013 and Skype for Business to Microsoft Teams
Today I’m talking about decommissioning your existing On Premises Persistent Chat servers as we have to moved these workloads into Teams
Note this article doesn’t cover the process of getting your users over to Teams, but the change management piece on it is super important (Needs more)
First off, Login to a Skype for Business/Lync Powershell session and lets check all the rooms. Run a
Get-CsPersistentChatRoom | Select Name
And validate that you are indeed ready to migrate these rooms

Now lets disable all the rooms, just so no more data gets put in there
Get-CsPersistentChatRoom | Set-CsPersistentChatRoom -Disabled $true
Then backup all your P-Chat data
Export-CsPersistentChatData –DBInstance 'SQLServerFQDN' –FileName “C:\Skype4badmin.com\Pchatdata.zip” -verbose
Protect this file! it contains all your Persistent Chat Conversations in clear text!
You can also do some due diligence here and backup the SQL instance as well.
Next, Remove all the P-Chat Rooms
Get-CsPersistentChatRoom | Remove-CsPersistentChatRoom -Confirm:$false
Double Check that all the Rooms are gone with
Get-CsPersistentChatRoom | measure
This should return a count of 0.
Now remove the Endpoint in AD
Get-CsPersistentChatEndpoint | Remove-CsPersistentChatEndpoint
And validate it has indeed gone by running
Get-CsPersistentChatEndpoint | measure
Get-CsPersistentChatEndpoint | measure
and validating it has a count of 0 again
Now in Topology Builder, Remove the Persistent Chat Pool and Publish the Topology.

Once that is complete. run the deployment wizard on the PChat servers to remove the components.
Then kick off a command prompt and navigate to either
C:\Program Files\Microsoft Lync Server 2013\Deployment\ or
C:\Program Files\Skype for Business Server 2015\Deployment\
and run "Bootstrapper.exe /Scorch"
And finally remove any Lync/Skype and SQL related apps using Appwiz.cpl
Now you can perform you normal server decommissioning process
While your at it remove the PChat databases using uninstall-csdatabase for PersistentChat and PersistentChatCompliance (if you have it)