Thursday, March 02, 2006

"RExec" on Windows

Have you ever tried remote-scripting a Windows machine? While on Linux SSH is your friend and allows you to apply a set of commands to any remote machine you have access to, Windows is much less script-friendly.

I found myself in a situation where I had to run a batch file on about 30 remote Windows servers. Not being to eager to open a remote desktop (terminal service) session to each of them, copy the file over, run it, delete it and log off again, I searched for some helpful tools. I quickly found the rexec.exe client program that ships with Windows, but that requires an rexecd on the server side. This does not even come with Windows but has to be obtained from a 3rdparty provider.

But where do you go if you want to find nifty tools for Windows? Right: www.sysinternals.com is always worth a try. And I really liked what I found: psexec is a very cool tool that allows you to remotely execute a command on a Windows machine (you have to authenticate first, e. g. via net use. It even allows you to run commands that are not available on the remote machine: they just get copied there for the time of execution and vanish afterwards. Really nice. Thank you SysInternals, saved me a lot of time again.

No comments: