RdWeb Can’t Manage Published Apps

18th February 2022

If you are in the process of adding RdWeb servers or if you rename a server you may get an error like the one shown below and not be able to manage your Published Apps.
The following servers in this deplyment are not part of the server pool

Here are the steps i took to fix this: Powershell as administrator

PS C:\Windows\system32> Get-RDServer
Server Roles
—— —–
WTREMOTE1.server.COM {RDS-RD-SERVER, RDS-CONNECTION-BROKER, RDS-WEB-ACCESS, RDS-GATEWAY…}
Thor.server.com {RDS-RD-SERVER}

PS C:\Windows\system32> Remove-RDServer Thor.server.com RDS-RD-SERVER -Force
Remove-RDServer : The RD Session Host servers are part of a session collection.
The following servers did not validate successfully.
Thor.server.com
At line:1 char:1
Remove-RDServer Thor.server.com RDS-RD-SERVER -Force
CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExceptionFullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Remove-RDServer

PS C:\Windows\system32> Import-Module RemoteDesktop
PS C:\Windows\system32> Remove-RDSessionHost -SessionHost “Thor.server.com”
Confirm
Removing server from the Remote Desktop deployment. Do you want to continue?
[Y] Yes [N] No [S] Suspend [?] Help (default is “Y”): y
PS C:\Windows\system32>

I can publish apps now