We have a Windows environment comprising XP SP3 workstations, some Vista Workstations, and Windows 2003 Server. I have need to start a process remotely on some of these systems from the command line (a script). The ID starting the process and the ID that will run the process are both members of the remote machine's Local Admin group and are not necessarily the same user. Policy prevents adding 3rd party software such as WinSSH, Cygwin, or others. Exceptions to the policy may be granted with great effort, but I am lazy.

I would like the ability to start a process remotely as a different (or the same) user as I can with SSH on UNIX variants. The closest I can come is using schtasks to remotely create/run/delete a task that accomplishes what I need. This is combersome and I have concern over password protection as the command traverses the network. Does Windows somehow encrypt the traffic when you issue: schtasks /create /tn /tr /ru /rp /sc once /st ?.

Is there a better way?

Is there a better way that doesn't require oceans of cscript?


PSexec will do what you want. It dosent need to be installed to use it.

As for security in PSexec, if the account you are using to execute PSexec on your machine has the right privelidges on the remote machine, then you dont need to enter a username and password with the PSexec command, and no credentials are sent in clear text 'over the wire' to the remote machine.

However if you have to incude username and password with the PSexec command then they will be sent in clear text to the remote machine.

  • I will add that this sounds like you would be doing this on an internal network. If that is the case and as long as your network is properly firewalled from the rest of the net, then I don't see the need to worry about the encryption. If your own people are sniffing your traffic and stealing passwords, then I would say you are solving the wrong problem. – EBGreen Aug 17 '09 at 12:53
  • Thanks. It turns out that the folks that create the server instances include some of the PSTOOLs untilities by default, including psexec. psexec should do nicely. – Jeff Hutton Aug 17 '09 at 15:09

Did you looked at psexec ?


My preference is to use psexec but I don't recall if the traffic is encrypted or not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.