Link to home
Start Free TrialLog in
Avatar of samiam41
samiam41Flag for United States of America

asked on

Streamline remote pc reboot

Hi Experts.  I have a script to reboot 200+ pc's in our environment (Xp/2003 AD) but noticed it takes a long time if it gets to a pc that may already be off.  I am hopeful that an expert knows of a way to streamline the existing script or will recommend a new script.  I have one small cavat and that is I am a novice at best with scripting (below novice with VB) so whatever your recommendation is, please keep that in mind.

One of the other experts helped me with another script I have which finds where a user is logged in.  For that script, he used the ping command which ended up working very well.

https://www.experts-exchange.com/questions/23834069/Modify-existing-script-to-decrease-run-time.html

Thanks for your help.
cd
cd tools
c:\tools
psshutdown -f -m "The computer is being restarted through an automated process.  Have a nice day!" -t 10 -u \\domain\username -p password @computers.txt
pause

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of andrew_aj1
andrew_aj1
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of samiam41

ASKER

Oh.....  I get what you're saying.  Interesting.  Let me give it a shot and will post back how it performs.
The worse case is that all the the computers in the smaller list are turned off, which means you will have to wait that many times for it to time out. The quickest way to shutdown all 200 will be to call the program once per computer, but I am not sure how the calling computer will handle processing that many commands at once. The program is most likely really small and quick so it may work without issues. If you do this the longest you will have to wait is for the last call to time out.
Good luck.
Thanks for the help!  I tested it on a smaller group (30) and found it work much quicker then just having one list.  I appreciate your time and suggestions.

Take care!
-Aaron