8 Comments

psshutdown is a bit more flexible than shutdown, but I believe in this case you could use shutdown just as effectively.
I like the idea of the script though, not having to wait for timeouts will really speed things up.

Thanks guys, as Matthew5942 said, psshutdown is a bit more flexible but yes you could use the normal shutdown.exe that is built in to windows.
You could use this as a basis for most scripts. For instance I use this method to run a WOL and shutdown script. I'm sure it could come in useful for other things as well.
Pleased you guys have found it useful!
Cheers

Thanks for this,i tested out on 20 winxp based machines but for me it worked like this(i changed the order provided by the psshutdown help and some minor changes to my needs) :
For reboot:
@echo off
c:
cd\
for /f %%a in (SHUTDOWN.CSV) do start "" PSSHUTDOWN -S -R -T 20 -M "This is a message for rebooting" -N 10 -u USERNAME -p PASSWORD \\%%a
For shutdown:
@echo off
c:
cd\
for /f %%a in (SHUTDOWN.CSV) do start "" PSSHUTDOWN -T 20 -M "This is a message for shutdown" -N 10 -u USERNAME -p PASSWORD \\%%a