Please enable JavaScript to view this site.

PowerShell Scripting - Tips and tricks


We are always asked for a full list of property names and sadly it is extremely hard to provide for multiple reasons. The best way is still to look at the xml structure of an entry of the proper type to identify the field names.

Reverse Engineering an entry's structure

1.Create an entry of the needed type, add only mandatory data at this time. Save the entry.

2.Right-click on the entry, then use Clipboard – Copy.

3.In the dialog that appears, switch to the Preview tab, copy the xml structure to a text file. This is the BEFORE.

4.Manually perform the modification to the entry that you would like to automate using PowerShell, save the entry.

5.Using Clipboard – Copy, save the modified xml to another file. This is the AFTER.

6.Compare the two files with your favorite difference tool, you will see the fields that have changed, and the values that have been assigned. This indicates what your script should do.

Essential information about Remote Desktop Manager's Xml format

To save space, most fields have a default value and when the field contains that default value, it simply does NOT appear in the content. That is why you must watch out for new fields that appear in the AFTER content.

Credentials are handled in a special way. They contain a GUID when they refer to other entries, but they hold Well-Known static GUIDs when they use other mechanisms.





Credential repository --- Prompt on connection ---



should be used for backwards compatibility only, we prefer not to list it here.

Parent (only for sub-connections)




My personal credentials




Private Vault, paired with PersonalConnectionID


Private Vault Search, paired with CredentialPrivateVaultsearchString


Tips and tricks

Use the Set-RDMProperty cmdlet to set almost any value within the session object. To find properties and paths, reverse engineer the session XML file format. Create a sample session in RDM and export it using the right click menu Import/Export - Export Session (.rdm).... Once exported, open the .rdm file with your favorite editor. Browse the XML structure to find the property path and name.

Use the AddDataEntryKind method to set the data entry kind to Web (11 in this case). This is not actually documented – it’s just a bonus tip that we use here at Devolutions all the time!