Friday, June 19, 2015

Generate a Remote Desktop Connection Manager config file from SQL Server Central Management Server

If you are a SQL Server database administrator (DBA) who also has need to administer servers via Remote Desktop, this script will be of tremendous help to you at least once, and may be something you run regularly.

This script will query your SQL Server Central Management Server (not using it yet? - check out Easily Manage your SQL Server with CMS and PBM Webcast) and generate the contents of a a config file for Microsoft's Remote Desktop Connection Manager.  All free tools or built into your SQL Servers.

Get the script at:

Prerequisites:
Install Remote Desktop Connection Manager (RDCMan) version 2.7 from https://www.microsoft.com/en-us/download/details.aspx?id=44989
Have populated a SQL Server Central Management Server (CMS) with at least one group and server

To use, run the script against the instance holding your CMS data.
Click on the link to the XML.  Select All and Copy:
Create a new text file with the extension *.rdg (for example MyCMSServers.rdg)  Paste the XML content:
 
In Remote Desktop Connection Manager, File->Open the *.rdg file

Details:
All unique host names are placed under a group called '_All Servers'.  The 'Smart Lists' dynamically filter based on the groups in your SQL CMS.  This is done by placing a comment in the RDCMan node for each server.  

The script doesn't yet generate hierarchical groups in RDCMan.  Keep an eye out for edge cases that I haven't tested yet: special characters in the server or group names, hosts that are found in more than one group, etc.

Get the script at:

Hope you enjoy!

1 comment:

nirob sadik said...

Great share, You have completed the tutorial to generate a remote desktop connection manager config file from SQL Server. I appreciate this kind of help.

you can check some exclusive tech tips here pccenter