1/12/2023 9:32:15 PM

If you ever forget a server password that is stored in a Remote Desktop Manager file, you can use Powershell to decrypt the file and retrieve the password. You will need to be logged in to the same computer and account that created the file.

# full path to your remote desktop manager exe $remote_desktop_manager_exe = "C:\Projects\Tools\Remote Desktop Manager\RDCMan.exe" # full path to your remote desktop file $remote_desktop_file = "C:\Projects\Tools\Remote Desktop Manager\default.rdg" # manually create this folder $temp_files = "C:\temp" Copy-Item $remote_desktop_manager_exe "$temp_files\RDCMan.dll" Import-Module "$temp_files\RDCMan.dll" $EncryptionSettings = New-Object -TypeName RdcMan.EncryptionSettings $XML = New-Object -TypeName XML $XML.Load($remote_desktop_file) $Credentials = New-Object System.Collections.Arraylist $logonCredentials = Select-XML -Xml $XML -XPath '//logonCredentials' $logonCredentials | foreach { [void]$Credentials.Add([pscustomobject]@{ Username = $_.Node.userName Password = $(Try{[RdcMan.Encryption]::DecryptString($_.Node.password, $EncryptionSettings)}Catch{$_.Exception.InnerException.Message}) Domain = $_.Node.domain }) } | Sort Username $Credentials | Sort Username #exit