Powershell: get password from RDM

Resolved

Powershell: get password from RDM

avatar

Hi guys,

I want to export a list of passwords with powershell and the way I'm doing it works but it's very slow.

It boils down to this:

foreach ($Entry in (Get-RDMEntry -Group MyGroup)) {
    [PSCustomObject]@{
        Name     = $Entry.Name
        Username = $Entry.HostUsername
        Domain   = $Entry.HostDomain
        Password = Get-RDMEntryPassword -ID $Entry.id.Guid
    }
}


Is there a way to get the passwords without calling Get-RDMEntryPassword? To just get them with Get-RDMEntry?

Best regards,
Thomas

All Comments (4)

avatar

Hello,

That's the only method to decrypt the password of any entry in PowerShell.

A faster method of exporting the passwords is to select the entries in a variable and use the Export-RDMSession cmdlet to export them to a CSV file.

$sessions = Get-RDMSession -Group MyGroup
Export-RDMSession -CSV -Sessions $sessions -Path $YourPath -Password $pwd


Let us know if that helps.

Best regards,

Érica Poirier

avatar

Thank you Erica, I'll check it out.

avatar

That worked and was a lot faster! Thank you very much!

avatar

Hello,

Thank you for your feedback. I'm glad you appreciate the provided solution.

Best regards,

Érica Poirier