The Battle of Renaming the RDS Server – 10 Steps of Troubleshooting

I have received a number of messages regarding what to do when you want to change the name of a RDS server. In particular the Connection Broker as it removes access to the RDMA when rebooting after a name change. Removing and re-adding session host’s, Gateways and web have no real problem, its a simple case of removing and reading. The issues usually come from the RD Connection Brokers.

I have used a number of method to attempt to resolve a name change and I have to say it can get a bit messy when RD Connection brokers are involved. In this particular instance, I have chosen to put all the roles on the same box to be awkward which causes more problems. In a real world scenario, you would separate roles out to seperate servers .

In one instance I ended up Uninstalling the Connection Broker using remove-WindowsFeature. What ever I did, the connection broker was registered as the previous name.

Step one – review the error message …


Step two – check the RDS server names – Open powerShell and use the:




Step Three – Check the Collections on the Server in question

 Get-RDSessionCollection -ConnectionBroker "Servername"


Step Four – remove the collection – if Present: 

Remove-RDSessionCollection -CollectionName "Collection Name" -ConnectionBroker "ServerName" -Force



You may be presented with an error or warning during this process


Step Five – remove the SessionHost Role – If present

Remove-RDServer "ServerName" -Role RDS-RD-SERVER -ConnectionBroker "ServerName"


Step Six – Restart Server Manager – same problem – mrrm


Step Seven – Remove the Connection Broker using Remove-WindowsFeature

Remove-WindowsFeature -Name RDS-Connection-Broker
Add-WindowsFeature -Name RDS-Connection-Broker


This clearly breaks the previous environment.

Step Eight – Check if RDMA Loads


The RDMA is now states that there is no RDS Deployment

Step Nine – Reconfigure Connection Broker 

install connection broker.png


The Connection broker name is showing but would not load the RDMA ?  – it would be great if MS introduce a connection broker repair/restore feature.





Step 10 – Check the RDMA 

After practically rebuilding RDS I can now gain access to the RDMA with the new Server Name.

Run the Get-RDServer cmd to show the server name:


Import-Module RemoteDesktop

As you can see – the server is now using the new name of RDS.


Finally – The RDMA console now opens.


From the looks of things, the RD Connection Broker cannot be renamed easily and I have gone to great lengths to see if there is a  way rename multiple rolled RDS Servers and the RD Connection Brokers. As the RD Connection Broker is the brains of the operation so to speak, changes to the RD Connection Broker will effect the whole environment. The simple fix for changing the Connection Broker server name is to rebuild RDS… Not great . You can remove and re-add the other roles using some of the techniques shown above, but when a connection broker is involved, you don’t really have much choice.

For none Connection Broker role Servers, use the Remove-RDServer Cmd and restart server management. This should solve any issues you have.

I am currently testing the modification of the RDCB Windows Internal Database and SQL DB for High availability. I will revisit this then. Any questions, feel free to ping me a message.

9 thoughts on “The Battle of Renaming the RDS Server – 10 Steps of Troubleshooting

Add yours

  1. You’re my hero! Long afternoon renaming a domain (don’t ask – blame the ex-employee) & then found RDS broken. This fixed it! Now I can go home!

  2. Microsoft does stupid things like this all the time. Only Microsoft could design a product where renaming the server breaks the server.

  3. I got myself at the same situation, my doubt is about “how to clean up data from a server that doesn’t exist anymore”?
    how safe is it? (is there a better way to clean it at ADSIEDIT.msc?

  4. Once again, to the rescue. Thanks man. There’s a typo above, there’s a space in Step Three that shouldn’t be there between Connection and Broker, -ConnectionBroker

  5. Hi,
    i would like to know if its possible to change the domain for an rds server ?
    i would to gor from domain A to domain B ? do you have procedure for this ?


  6. I chose to fix this by updating the values in the RDCB database (I use Windows Internal Database (WID), not SQL/HA but it could also work on SQL/HA, maybe)

    RUN: mstsc /v:NewServerName /admin

    Install SQL Server Management Studio on the RDConnectionBroker server so you can connect to WID database

    Connect to the RDMS database in SQL Server Management Studio,
    Open SSMS by using right click, “Run as administrator” and in the database server copy/paste



    Use Windows Authentication

    TAKE A BACKUP OF RDCms Database!!! I’m not responsible if this breaks it!

    update [RDCms].[rds].[Server]
    SET Name = ‘NewServerName.exampledomain.local’ WHERE Name like ‘%OldServerName%’

    Update [RDCms].[rds].[RdcbConfig]
    SET Cap = ‘NewServerName.exampledomain.local’ WHERE Cap like ‘%OldServerName%’

    Update [RDCms].[rds].[Environment]
    SET Name = ‘NewServerName.exampledomain.local’ WHERE Name like ‘%OldServerName%’

    update [RDCms].[rds].[ConnectionBroker]
    SET Name = ‘NewServerName.exampledomain.local’ WHERE Name like ‘%OldServerName%’

    UPDATE [RDCms].[rds].[DeploymentSetting]
    SET Name = REPLACE(CAST(Name AS nvarchar(max)), ‘OldServerName’, ‘NewServerName’)
    WHERE Name like ‘%OldServerName%’

    update [RDCms].[rds].[Target]
    SET Name = ‘NewServerName.exampledomain.local’, Fqdn = ‘NewServerName.exampledomain.local’, Netbios = ‘NewServerName’ WHERE Name like ‘%OldServerName%’

    NOTE: I had tried so many other commands before trying this approach that I think I messed up the values in the table [RoleRdsh] because they were showing NULL on some fields so after running the above commands I was able to open RDMA and I noticed the server was not there as a Session Host so I added the server as a Session Host and everything worked.

    Also you should verify that the table rds.Server and rds.RoleRdsh doesn’t have servers that do no longer exist in your AD. If it has then delete them (example: delete from rds.Server where ID=’2′ ; delete from rds.RoleRdsh where ServerId=’2′;)

    Hope this helps someone.

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.

Create a website or blog at

Up ↑

%d bloggers like this: