KB ID 0001415
Problem
I was doing some RDS work for a client today, and it would seem that at some time in the past their RDS Licensing server had died, it had been replaced, and everything was working OK. But when I was adding roles to the new servers, this kept popping up;
The following server in this deployment are not part of the server pool
1. Server-Name
The servers must be added to the server pool.
I could have ignored the error and finished the job, but things like this remaining ‘unfinished’ really wind me up. So I thought I’d sort it out.
Solution
At first I thought I could just dive into either ADSIEdit or ‘AD Sites And Services’, make a quick change and everything would be fixed. That revealed that the site licence server was set to a server that also didn’t exist! (So I fixed that, still the problem remained).
So if all else fails then use PowerShell right?
Error: Object Reference not set to an instance of an object
After some research I discovered that the RDS servers are stored in a database, (Windows Internal Database) on the connection broker(s). So you need to download the ‘SQL Management Studio’ software on your connection broker(s). Then ‘Run As’ administrator.
Connect to, “\\.\pipe\MICROSOFT##WID\tsql\query“
Under Databases you will find a database called RDCms >Expand that, and drill down to the tables. Locate rds.server. Press the ‘Query’ button > Right click the rds.server table > List top 1000 rows.
Locate your ‘Dead’ server here you can see mine has an ‘Id’ of 3. Look in the following tables and make sure there are no references to Id 3. (I didn’t have any, my only reference was in the rds.server table.)
- rds.RoleRdcb (Connection Broker)
- rds.RoleRdls (License Server)
- rds.RoleRdsh (Session Host)
- rds.RoleRdvh (Virtualisation Host)
- rds.RoleRdwa (Web Access Host)
In the bottom of the Query Section enter the following, (as applicable, i.e your column might be ServerId, and your server might be number 123)
delete from rds.server where Id=3
Press ‘Execute’, Close the SQL Manager, repeat on any remaining ‘Session Brokers’. Have a coffee, then try again, the problem should be resolved.
Related Articles, References, Credits, or External Links
NA
25/07/2018
Excellent, solved my problem. Thank you very much.
02/04/2020
Wow!
What a timesaver this article has been for me.
I have a RDS ‘cluster’ with 4 server.
2 of them I have removed from the remoteApp collection.
And of course, I also removed them from AD
Now later they were still showing up, only on the ‘Collections’ level.
And exactly as in your case the error was ‘Object Reference Not Set’
By following the steps as described above it worked to get them out.
Thank you !
07/04/2020
Glad to help 🙂
22/03/2019
This is great stuff! I used same method to REMOVE dead and long gone Connection Broker, and point the “setting” for primary one to the new one (server I edited the DB on).
Thanks!
22/03/2019
Glad to help!
P
27/05/2019
Hi
This is really helpful.. but I’m stuck.
Although I can open the SSMS, see the DB and tables, all queries return empty tables.
I’m stuck with 2 SH that are dead and gone and no way to access the RDS configuration.
Any hint ?
Thanks
Fab
28/05/2019
This sounds more like permissions? do you ‘run as’ administrator?
Pete
26/07/2019
I am having the ame problem as Fabian, yes I ran as administrator. But all tables are empty. I ran as local administrator and domain administrator. Any ideas?
22/02/2022
I tried to do the same job, got an empty result in the SQL query.
I was managing all RDS from the broker, Collection was working, I am sure that I am running from the broker.
One of the server failed, can’t bring so I want to remove it.
I did run as Administrator – SSMS, confirmed.
Anything else to try?
28/01/2020
Thanks for the great writeup! Helped me out to fix this dumb issue… We had added a new host with the same name and somehow the entry was screwed up in the database.
03/03/2021
Great article, solved me a big headache with a customer today!!! Thanks alot!!
19/05/2022
Hi!
Thanks so much.
You helped me 😀
20/09/2022
works like a charm! Thanks again!
25/10/2022
This is the only solution that worked for me. Thank you.
28/12/2022
Great article, solved me a big headache today!!!
Thank you. This is the only solution that worked even for me.
28/02/2023
What do you do if the Dead Server ID shows up in one of the additional tables too such as rds.RoleRdsh?
07/06/2024
Un maestro, gracias
12/02/2025
All the tables are empty. Any thoughts?