whitelistCMD 1 Posted May 9, 2017 Share Posted May 9, 2017 Is anyone aware of how to use the Run Command Client Task to run an executable as a domain administrator? I'm really only stuck on the credentials portion of this. If I run as a specific user, and I'm not in front of the machine I'm running the task on, what is required in the "command line to run" in order to supply my credentials? For example: RUNAS /user:domain\username filename.exe <-- How do I provide credentials? Thanks in advance. Link to comment Share on other sites More sharing options...
Administrators Marcos 4,923 Posted May 9, 2017 Administrators Share Posted May 9, 2017 What about using psexec? https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx Link to comment Share on other sites More sharing options...
whitelistCMD 1 Posted May 9, 2017 Author Share Posted May 9, 2017 Mainly because of the lack of triggers, but also because we have a similar feature in ERA and would like to give it a try. Link to comment Share on other sites More sharing options...
jimwillsher 65 Posted May 10, 2017 Share Posted May 10, 2017 I think that's a limitation of runas - there's no way to specify the password as a positional parameter, it is always prompted for (unless you've saved credentials previously). Psexec, as suggested by Marcos, allows the password to be specified. Of course you don't have to use psexec on the server to connect to the client, you could use ERA to run a command where that command is the psexec command itself. in other words have ERA run psexec (e.g. triggered), and have psexec run your desired command. It's a bit clunky but it should work. psexec can connect to the "self" computer. Link to comment Share on other sites More sharing options...
Recommended Posts