cntour Posted October 28, 2008 Share Posted October 28, 2008 I wrote a script to shut down remote PCs using "shutdown" command. My problem is this command is time consuming and it takes a long time to shutdown all those 80 PCs on my list. It will take longer time before return error message if that PC is offline. I am considering alternative to shut them down. Any suggestions? Thanks a lot. Link to comment Share on other sites More sharing options...
Bert Posted October 28, 2008 Share Posted October 28, 2008 Do a ping loop to see what PCs are online first. If you get a reply, then you know the PC is up, and you can then send the shutdown command only to the ones that are up. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
LarryDalooza Posted October 28, 2008 Share Posted October 28, 2008 If you are savvy, you will use Run() with the STDOUT flag and the PID returned and collect STDOUT into an array of buffers and check the buffers for success. I don't know if SHUTDOWN.EXE reports success within the STDOUT stream... but maybe it does. Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
cntour Posted October 28, 2008 Author Share Posted October 28, 2008 Thanks Volly and Larry. I will ping them first. I am considering split my list into 2 txt file. For example, I use "sd.exe list.txt" to shut down all PC. now I split the list.txt into list1.txt and list2.txt, and schedule them to run at the same time. Is that feasible? Thanx!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now