diagram Posted May 7, 2008 Posted May 7, 2008 I've been experimenting with psshutdown recently to automatically shutdown stations I have listed in a file. I have a .txt file listing the stations in each room and another .bat file for each room. e.g bio_lab1.bat is simply: psshutdown.exe @bio_lab1.txt -k This works for stations at the start of the .txt file, but then starts to ignore/timeout the remaining stations with the message: "Timeout accessing //strangeways/station123 If //strangeways/station123 is already performing a shutdown operation you must abort it before issuing a different command" I've tried cutting the top off the .txt file so it just had the last two stations -and it worked. Has anyone any suggestions? P.S. running an RM CC3 setup - RM's tool too slow for what I want.
richard.thomas Posted May 8, 2008 Posted May 8, 2008 I've never used psShutdown. We use window's built in shutdown magicness for shutting down machine here. Have you checked for firewalls on the problem clients?
browolf Posted May 8, 2008 Posted May 8, 2008 i use down from lstools its more robust. its still slow waiting if the computer isnt on. what happens if someone's using the pc when you're shutting it down? see also shutdown system
Ravening_Wolf Posted May 8, 2008 Posted May 8, 2008 Could be timeouts caused by multiple stations accessing the same txt file at once?
diagram Posted May 8, 2008 Author Posted May 8, 2008 I might try some of the alternatives, or *have* to try some of the alternatives. Here's more information: I don't think there is a firewall issue as the stations respond to a direct command and also when they are in a small file i.e two stations and also I am not aware there is a firewall. I'm only running commands and the batch file when the room is empty and the stations are a mixture of OFF or at log-on screen. I don't think the stations are trying to acccess the .txt file - I am running one instance of psshutdown at my workstation which should send out the necessary shut-down instructions to each workstation in the .txt file - they shouldn't need to know any more.
Joanne Posted May 8, 2008 Posted May 8, 2008 we once had the problem of the switches blocking 'broadcasts' Could you switches be doing this? So you send the command and the switches realise halfway through and stop it?
diagram Posted May 8, 2008 Author Posted May 8, 2008 I've figured out the "problem". PSShutdown.exe batch command works through the list fine, until it meets a station already off. Once it encounters a station already off, it barfs on the rest of the list no matter how many are on. Blinking fan-tas-tic!
gshaw Posted May 8, 2008 Posted May 8, 2008 I've figured out the "problem". PSShutdown.exe batch command works through the list fine, until it meets a station already off. Once it encounters a station already off, it barfs on the rest of the list no matter how many are on. Blinking fan-tas-tic! I hope that's wrong Although I've got 2 test PCs at the end of my list that seem to be shutting down so it must be making it through... hmm very odd
maniac Posted May 8, 2008 Posted May 8, 2008 Easiest way I've found of shutting down machines is to create two batchfiles. Set one to run at machine startup with the commands; at /DELETE /YES at 21:00 /every:M,T,W,Th,F "\\domain\netlogon\shutdwn.bat" This adds a scheduled task that calls a script called shutdwn.bat on the netlogon share at 9:00 pm every day. You can adjust this as you need to of course. Then in the shutdwn.bat file, simply use this command shutdown -s -f -t 60 -c "End of day shutdown. Please save your work now, this workstation will shutdown in 1 Minute. This cannot be cancelled." Which obviously calls the windows built in shutdown command, and displays the appropreate message. This works like a charm for us and has done for the last year. It's pretty flexible as well as if you ever need to change or cancel it you can simply change the shutdwn.bat file accordingly. Every month or so we make it call defrag insted of shutdown. Incidently, do not name the batchfile 'shutdown.bat' else it will run itself in an endless loop! Mike. 2
richard.thomas Posted May 9, 2008 Posted May 9, 2008 We shutdown our machines with a cmd file for each room. Inside the file are shutdown -s -t25 -m \\COMPUTER NAME This are ran from the server via a scheduled task. This means we can change the time or disable a shutdown script at short notice. Seems to do the trick
gshaw Posted May 9, 2008 Posted May 9, 2008 Cheers for that maniac, I like the look of that method - going on the test area now
howartp Posted May 16, 2008 Posted May 16, 2008 Easiest way I've found of shutting down machines is to create two batchfiles. Set one to run at machine startup with the commands; at /DELETE /YES at 21:00 /every:M,T,W,Th,F "\\domain\netlogon\shutdwn.bat" Mike. Hey, that sounds a brilliant idea. Definitely on my list for sorting - after Ofsted next week... Now if only we could do the same for WOL... Peter.
JScotton Posted May 19, 2008 Posted May 19, 2008 Hey Mike, how did you get around users having no access to at.exe?
howartp Posted May 19, 2008 Posted May 19, 2008 To prevent it stopping at a machine already shut down you could always use a Magic Packet utility to turn all the machines on first, then run the shutdown script. I just use a batch file with the SHUTDOWN command. It does hang if the machine is already off, but soon moves onto the next computer in the list. The problem with this, both with the magic packet to wake the PCs first, and the shutdown batch script, is you need all the machine names/MAC addresses, whereas telling each machine to shut itself down would avoid this issue. Peter
Alis_Klar Posted January 20, 2011 Posted January 20, 2011 Easiest way I've found of shutting down machines is to create two batchfiles. Set one to run at machine startup with the commands; at /DELETE /YES at 21:00 /every:M,T,W,Th,F "\\domain\netlogon\shutdwn.bat" This adds a scheduled task that calls a script called shutdwn.bat on the netlogon share at 9:00 pm every day. You can adjust this as you need to of course. Then in the shutdwn.bat file, simply use this command shutdown -s -f -t 60 -c "End of day shutdown. Please save your work now, this workstation will shutdown in 1 Minute. This cannot be cancelled." Which obviously calls the windows built in shutdown command, and displays the appropreate message. This works like a charm for us and has done for the last year. It's pretty flexible as well as if you ever need to change or cancel it you can simply change the shutdwn.bat file accordingly. Every month or so we make it call defrag insted of shutdown. Incidently, do not name the batchfile 'shutdown.bat' else it will run itself in an endless loop! Mike. I think we'll use this but we'll make different batch files for each room so we can alter the shutdown time for a particular room. We already have each room in it's own OU so it should be easy! The only issue with this approach vs a server issued shutdown is if you need to keep the machines on later than usual at late notice but it does get around the speed slowdown issues where the server hits machines that are already off.
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