Use PowerShell to decrypt password stored in a RDG file


If, like a colleague, you forget frequently the passwords you stored in your RDG file. There is a way to decrypt the secured string using the RDCMan.exe file.

First you need to copy the RDCMan.exe and change the extension to “dll” (“RDCMan.dll”).

[ps]Copy-Item ‘C:\Program Files (x86)\Microsoft\Remote Desktop Connection Manager\RDCMan.exe’ ‘C:\temp\RDCMan.dll’
Import-Module ‘C:\temp\RDCMan.dll’
$EncryptionSettings = New-Object -TypeName RdcMan.EncryptionSettings
[RdcMan.Encryption]::DecryptString($PwdString, $EncryptionSettings)[/ps]


The string are encoded with the local user profile that is used to set the password in the RDG file. Therefor the string cannot be decrypted from another user account than yours.

The RDG file is a simple XML file. Using PowerShell you are able to parse the file and gather one or every password stored in the file for decryption.