Update: 30th July 2020
Having just assisted a colleague troubleshoot this specific problem when attempting to remove Skype for Business server from an environment, I thought it was about time I updated this post with some further info! More on that below.
After building a brand new Skype for Business environment for a customer, I set about decommissioning their legacy Lync 2013 environment. Everything was going well until I tried to remove the Lync 2013 Director from the topology.
Whilst publishing the updated topology, the wizard spat back the following error:
Error: Cannot publish topology changes. Users or contacts are still homed on a pool that would be deleted. Move or remove the users or contacts before continuing
Alright, where are these pesky users or contacts?
Well, turns out that the user that was causing all the issues had been migrated to Office 365 Lync online prior to the environment being decommissioned. This user still had remnants of the Lync director within its properties, although none of this showed up on prem when running Get-CSUser
To fix this issue, I migrated the user from Lync online, down to a newly built Skype for Business front end pool. Doing so updated the users properties which then allowed me to remove the Lync Director from the topology.
Further Information
Having trawled the Internet, here’s a complete list of commands to run within the pool to figure out if there are any stale objects remaining that are preventing you from removing the pool:
Get-CsUser
Get-CsExUmContact
Get-CsCommonAreaPhone
Get-CsAnalogDevice
Get-CsRgsWorkflow
Get-CsDialInConferencingAccessNumber
Get-CsAudioTestServiceApplication
Get-CsTrustedApplicationEndpoint
Get-CsPersistentChatEndpoint
Get-CsTrustedApplication
Get-CsConferenceDirectory
Get-CsCallParkOrbit
Get-CsUnassignedNumber
Get-CsTrustedApplicationComputer
Get-CsMeetingRoom
Also, a word of warning: Running Disable-CsUser will remove that users LineURI – which may cause you issues if you’re still syncing user data from on-premises AD to Office 365.