Renaming or Domain Transfer RDS Server

note: This is for personal reference and thanks for the Author. please see bottom page for the the original link.

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 …

Renameerror.png

 

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

Get-RDServer

Cmd

Get-rdserver.png

Step Three – Check the Collections on the Server in question

 Get-RDSessionCollection -Connection Broker "Servername"

check-collection.png

Step Four – remove the collection – if Present: 

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

remove-collection.png

RemovingCollection.png

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

errorremovingcollection.png

Step Five – remove the SessionHost Role – If present

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

removedsessionhost.png

Step Six – Restart Server Manager – same problem – mrrm

Renameerror.png

Step Seven – Remove the Connection Broker using Remove-WindowsFeature

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

RemWindowsFeature.png

This clearly breaks the previous environment.

Step Eight – Check if RDMA Loads

CheckRDMA.png

The RDMA is now states that there is no RDS Deployment

Step Nine – Reconfigure Connection Broker 

install connection broker.png

InstallConnectionBR2.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.

deploymenttype.png

Deploymenttype2.png

SelectServer.png

Confirm.png

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:

RDserver2.png

Import-Module RemoteDesktop
Get-RDServer

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

RDMA.png

Finally – The RDMA console now opens.

Summary:

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.

 

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

Leave a comment