Windows Server 2012: Remove Manually Server from Remote Desktop Services

One of the most important things on TechNet is the great technical documentation about all the Microsoft’s applications. Is less easy find solutions to particular problem, because the scenarios are too huge and because is very hard replicate all the casistics.


This is one of this rare scenario with Remote Desktop Services:


  • Hyper-V Host in a domain configurated ad Remote Desktop Virtualization Host
  • After a critical error the host is corrupted and the restore is impossible


Lose one of the RD Host Virtualization could not be a huge problem but sometimes some functionality may be less, for example creation of User Profile Disks for the Virtual Machine Pool, as showed in figure 1.


Figure 1 – User Profile Disks Error

In the event viewer it’s possible find a specific problem about DCOM – figure 2. This issue is generated because the remote machine is not available.


Figure 2 – Event ID 10028

The first activity¬† is try to remove the unavailable RD Virtualization Host, but sometimes this operation is impossible because there’s reference error; the detailed message is: Could not remove the configuration. Object reference not set to an instance of an object – figure 3.


Figure 3 – Message Error


Not all the people knows that RDS Connection Broker use a dedicated instance of Windows Internal Database to register all the information about Virtualization Host, Session Host, Pool/Personal VM and much more. So the idea is to change manually the database’s configuration.


The first step is download the SQL Server Management Studio in the same machine where’s installed the Remote Desktop Connection Broker. After that, with SSMS, connect with this path \\.\pipe\MICROSOFT##WID\tsql\query.


In the table rds.Server could be possible find all the servers relative with Remote Desktop Services, as showed in figure 4. Find the obsolete machine and remove it. The same operation must be do in the table rds.RoleRdvh; be careful because there aren’t column with the FQDN/Netbios so take in mind the right ID value of removed server.


Figura 4 – Tabella SQL

Now it’s time to refresh the Server Manager to see the new result.


Oh….this is not an official workaround so maybe is not supported in production from Microsoft. Pay attention because you can damage the entire environment!