So, I’ve been running UNIX and Linux for a long time. I’ve also run Windows for a long time. I do have a preference and one of my chief issue with Windows (and the reason I feel it’s tedious) is that it is difficult to script against. That is not really a problem when you are running a handful of servers, but when the number goes to dozens, clicking simply doesn’t cut it for me.
With that in mind, I was very excited to find PsExec. It allows you to run a command across one or more servers, rather than logging in to each one. It’s even possible to write a script and then call it with PsExec, which will take care of moving it to the server and running it.
The incantation of that command is rather simple:
psexec \\\\SERVER_NAME -u USERNAME -p PASSWORD -w WORKING_DIRECTORY COMMAND
If you are living in an Active Directory environment, you can even forgo the USERNAME and PASSWORD!
While the scripting on Windows is still far less rich and capable than on Linux (yeah, I know you can get it done), this tool sure makes things pretty easy and far more tolerable than RDP’ing it up.