On October 18th Microsoft released version 8 of it’s Remote Desktop app via the App Store. Which is great as the older version had been more than buggy & we’ve just started a project which requires users to RDP into VM’s.
Below are the steps taken to figure out how a connection is created and stored, as well as a way to script the connections.
Following Rich Troutons excellent steps I managed to download a copy that is App Store account free.
Next steps was to figure out how to deploy connections to this app. Well, that’d be a simple plist in ~/Library/Preferences right? Nope! Remember this is Microsoft (the people whom use a plist in the format of the windows registry…), so off armed with TextWrangler, Composer & steely determination I went about figuring this thing out.
I loaded up Composer & ran “Monitor File System Changes” then preceded to create a connection in Microsoft Remote Desktop. it appears that the path of the plist is indeed not standard & exists in: ~/Library/Containers/com.microsoft.rdc.mac/Data/Library/Preferences/com.microsoft.rdc.mac.plist
UPDATE: As per the comments below, it appears for Mac App Store application plists is always in this location
A Quick Look in Finder of the plist showed that at the top there is an array which contains a UUID for each Connection.
This UUID string is then used within each key to differentiate settings between connections.
Luckily enough the UUID seems to be generated using the simple command below & so can easily be scripted using:
From there on it’s pretty straightforward to create a script, below is the GUI with the variable names as per the script which can be found on at the bottom of this post
Examples of variables to pass can be seen in my Casper Remote window below:
In the above example I have left the UUID field blank, which will create one when the script runs. You could specify your own UUID by generating one via the uuidgen command above & thus give you the ability to easily update a Connections settings down the line.
Once the above is run, the connection should appear My desktops section within the Microsoft Remote Desktop app.
This now reminds me to Vote Up the following feature request to allow a script to be used multiple times within a policy so this could be used to specify multiple servers, if you agree it’s here.