Quick Tip: How to Recover the lost password of Remote Desktop Manager?

I have recently came across a typical situation where I completely forgot the Remote Desktop manager’s password. I thought to recover the password by calling the help desk but I knew ti is going to take so much time to get it back because of many regulatory and compliance issue. So I found a quick alternative. I wrote a power shell script to decrypt the lost password.Here are the steps:

1. Locate the RDCMan.exe file and copy the RDCMan.exe file with the DLL extension.

Copy-item ’C:\Program Files (x86)\Microsoft\Remote Desktop Connection Manager\RDCMan.exe' C:\RDCManDll\RDCMan.dll

2.Import this DLL by using powershell

Import-module C:\RDCManDll\RDCMan.dll

3.Now search the RDG file which contains the password in the Encrypted fashion. Here is the sample RDG file and open it in notepad.

This will show you the username and password in the encrypted format.

4. Copy the Encrypted password and paste it in the below mentioned script.It will display the lost password.

$EncryptSettings=new-object -TypeName RdcMan.EncryptionSettings
$pwdstring= 'Encrypted password copied from text file depicted above'	
[RdcMan.Encryption]::DecryptString($pwdstring,$EncryptSettings)
$pwdstring

Please find the full running code in one place

Copy-item ’C:\Program Files (x86)\Microsoft\Remote Desktop Connection Manager\RDCMan.exe' C:\RDCmandll\RDCMan.dll
Import-module C:\RDCmandll\RDCMan.dll
$EncryptSettings=new-object -TypeName RdcMan.EncryptionSettings
$pwdstring= 'Encrypted password copied from text file depicted above'
[RdcMan.Encryption]::DecryptString($pwdstring,$EncryptSettings)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.