Retrieve secured command parameter as plain text

Retrieve secured command parameter as plain text

avatar

We have quite a few automatically generated "CommandLine" type entries in RDM which I would like to access via PowerShell. The entries have 4 default parameters which are all of type "secured", so I get this result when accessing it:

PS C:\Git> Get-RDMVersion
2025.1.38.0
PS C:\Git> Import-Module Devolutions.PowerShell
>> 
>> $ds = Get-RDMDatasource -Name $dataSourceName
>> Set-RDMCurrentDataSource -Datasource $ds
>> 
>> $v = Get-RDMVault -Name $rdmVault
>> Set-RDMCurrentVault -Repository $v
>> 
>> $entry = Get-RDMEntry -Group $rdmPath -name $rdmEntry
PS C:\Git> $entry.Cmd.Param1Default
PS C:\Git> $entry.Cmd.SafeParam1Default
/kmQ.....
PS C:\Git>

The parameters are all shown as "SafeParam1Default" (..4), but the "ParamxDefault" is empty (strangely enough, I changed one entry which is just an IP to type "Text" and it is still shown only as "Safe..." parameter - this might be a bug).

I would like to access the parameters as plain text, but did not manage to get "Get-RDMEntryPassword" working here. How get I get this done?

All Comments (1)

avatar

Hello,

The parameters are always stored encrypted regardless of their type — the type only affects how the value is displayed in RDM. This is expected behavior.

That said, the Devolutions.PowerShell module does not currently expose those sensitive values by design, so there is no cmdlet available to retrieve them at the moment. I have opened a ticket to have this addressed in a future release.

Do not hesitate to reach out if you have any further questions.

Best regards,
Maxime