metallicafan
[H]ard|DCer of the Month - May 2010
- Joined
- Mar 30, 2005
- Messages
- 2,205
Hello all-
I was looking to shutdown a bunch of computers at work every night with a simple batch script and the Sysinternals utility psshutdown.
Here is the basic script I am starting with:
It works fine but the only thing thats weird is that at the end of the psshutdown command it just hangs. It never makes it to the echo Shutdown Complete line. I thought maybe it was just the computer I was working on but I have tried several different computers with the same result.
Now if I hit control-C when its done cycling thorugh all the computers (when it is just hanging) it will prompt: Do you want to cancel this job(Y/N). If I hit N then it completes the echo statements right away.
Does anyone have any suggestions to why this might be happening?
I was looking to shutdown a bunch of computers at work every night with a simple batch script and the Sysinternals utility psshutdown.
Here is the basic script I am starting with:
Code:
echo Starting shutdown at:
time /T
psshutdown -c -m "Nightly Shutdown" -n 5 @c:\shutdownlist.txt /accepteula
echo Shutdown Complete.
echo Shutdown finished at:
time /T
pause
It works fine but the only thing thats weird is that at the end of the psshutdown command it just hangs. It never makes it to the echo Shutdown Complete line. I thought maybe it was just the computer I was working on but I have tried several different computers with the same result.
Now if I hit control-C when its done cycling thorugh all the computers (when it is just hanging) it will prompt: Do you want to cancel this job(Y/N). If I hit N then it completes the echo statements right away.
Does anyone have any suggestions to why this might be happening?