Automatically generate RDCMan connection files with a script

RDCMan has to be my favorite tool. It’s a free program from Microsoft, where you can store all RemoteDesktop connections to your own servers and to your customers servers. I’m using each day, and I’m probably spending more time in that program than even Web Browsing and Outlook combined.

When I’m building new Private Clouds (datacenters) for customers, we deploy 20+ servers in a short time, and it’s quite a lot of work to add each server manually to RDCMan even though I’m of course using inherit on most settings, so all that needs to be done is add the servername and displayname. Though repetetive!  So, lets use powershell!

RDCman is using a XML file for all the information, which it’s possible to create via powershell. I was lucky and found an almost perfect script done by powershell guru and MVP Jan Egil Ring.

I’ve modified that script a bit to be more in line with what I need, and updated it for RDCman 2.7 (no big deal, the old file worked in 2.7 too).

Version 2.0 of the script released 15/07/2015:

  • Updated for RDCMan 2.7
  • Only including ComputerObjects (no ClusterNames, Cluster Resources etc)
  • Only including Enabled Computer objects
  • Adds Computer Description as Comment
  • Not using a Group. I felt no need for that as there is just one environment in each RDG File
  • Support for Providing a RDGateway Address
  • Changed file name to reflect FQDN of Domain (we have several customers with the same Netbios name)
  • Sort servers alphabetically in the list.

Just run the script on a server with powershell and AD module installed, and it will create a brand new RDG file for you in your profile.
Note that it’s possible to provide a RDGateway Address and if it’s should be enabled by default.

The script gets scrambled when I’m publishing it on my blog, so please download the script from TechNet Gallery here: https://gallery.technet.microsoft.com/scriptcenter/Automatically-generate-da1d502b

Please let me know if you have any issues or suggestions for making the script even better.
Thanks!