Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

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.

share|improve this answer
    
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
add comment

Did you looked at psexec ?

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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