Forum / Remote Desktop Manager - Macro/Script/Tools

Command line script username/password question

  • Create an Issue
  • Cancel

hi all, hoping someone can help me solve this conundrum I'm trying to sort...
I'm trying to create a command line session that will launch 'AD Users and Computers' against a few different AD domains that a number of techs can launch who are not bound to any of the domains. Outside of RDM, this command line works: runas /netonly /user:"domain\username" "cmd /c mmc.exe dsa.msc /server=<servername>"
I need to make the command as generic as possible. To launch servers normally, we use the RDM private vault feature, so each tech uses their own username and password which is passed through as the creds to a server session. I can't work out though how to call these creds from within this command line. The server name I can replace with $HOST$" if I make the command line session a sub-entry of a DC, but I'm stuck on how best to make the creds generic and how to call them from the script. any thoughts would be welcome. many thanks, Charlie.

Clock3 yrs

Hello,

Could you post some print screens of the properties of your session please. This will help me to provide you the best solution regarding the credential management.

Best regards,



Jeff Dagenais

signaturesignature

Clock3 yrs

thanks Jeff...I responded to you directly coz there's some sensitive info in the screenshots I've included.
many thanks, Charlie.

Clock3 yrs

Hello Charlie,

The private message has been received.

Let me analyze everything and get back to you.

Best regards,



Jeff Dagenais

signaturesignature

Clock3 yrs

hi Jeff, wondering if you had a chance to look at this issue?? cheers, Charlie.

Clock3 yrs

Hello Charlie,

Sorry that you didn't receive my Private Message concerning this. I will put my message here.

As I understand, all your sessions are configured to be inherited.

If it's the case, I would like you to change the command line in the Macro/Script/Tool session for the following:
runas /netonly /user: "$DOMAIN$\$USERNAME$" "cmd /c mmc.exe dsa.msc /server=$HOST$"

Then, if you run the Macro/Script/Tool on the proper RDP session, the appropriate domain and username should be diplayed. Is it the case?

Best regards,



Jeff Dagenais

signaturesignature

Clock3 yrs

thanks Jeff...I missed your PM, apologies. So that does indeed seem to work, the command inherits the username from the higher level and uses the private vault creds. The command still requires the AD password to be entered manually though, but that's a limitation of the runas command I believe? So 50% there with the hoped functionality. Is there any way you can think of to feed the password to the command as well to make it even more efficient? cheers.

Clock3 yrs

Hello,

Indeed, the password need to be entered manually because of a limitation of the runas command.

Best regards,



Jeff Dagenais

signaturesignature

Clock3 yrs