Passing Entry Variables into Applications or Shell Scripts

Passing Entry Variables into Applications or Shell Scripts

avatar
jroashe
Disabled

In RDM, there are entry variables such as $INFORMATION_COMPANY$, $IP$, $USERNAME$, $PASSWORD$, etc.

I may have my username and password in a private vault, but I want to pass my $USERNAME$, $IP$, and possibly $PASSWORD$ into a powershell script.

When I launch a powershell entry from within RDM, I want access (in powerhsell) to the RDM entry variables $USERNAME$ and $IP$.

All Comments (5)

avatar

Hello,

To use the RDM entry variables in a PowerShell script, you just have to use them directly in the script.

Here is a sample :



If you want to use the password variable in the script, you need to enable the Allow password in variable option in the Security tab of every entry you want to use your PowerShell script.



To configure all your entries to enable the Allow password in variable option, you can use the Batch Edit feature - https://help.remotedesktopmanager.com/edit_batch.htm

Best regards,

Érica Poirier

avatar

I tested this and was not able view the value of variable $HOST$ in the script.


Also, the second image that you have displayed regarding "Allow password in variable" is not an option with Macros/Scripts/Tools entries.

avatar

Hello,

Could you please post a screen shot of the properties of the PowerShell entry you are using and also the content of your PowerShell script?

The Allow password in variable option is located in entries like RDP, SSH but not in the Macros/Scripts/Tools entries.

Best regards,

Érica Poirier

avatar

I have a similar issue with Custom fields
I have created a custom filed name ServerID and interested data into it.
I am unable to pass this data to a script in events.
I was able to use system variables.

I am using the latest version of RDM

avatar

Hello,

Let me know if the answer I provided on the following helps.
https://forum.devolutions.net/topics/39349/using-events-before-start#175430

Best regards,

Érica Poirier