Network and Classroom Management Thread, psshutdown runs out of steam in Technical; I've been experimenting with psshutdown recently to automatically shutdown stations I have listed in a file. I have a .txt ...
7th May 2008, 03:53 PM #1
- Rep Power
psshutdown runs out of steam
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.
IDG Tech News
8th May 2008, 11:58 AM #2
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?
8th May 2008, 12:19 PM #3
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
8th May 2008, 12:25 PM #4
Try LanShutdown from lantricks, saves a lot of hassle.
8th May 2008, 12:56 PM #5
Could be timeouts caused by multiple stations accessing the same txt file at once?
8th May 2008, 02:21 PM #6
- Rep Power
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.
8th May 2008, 02:32 PM #7
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?
8th May 2008, 02:57 PM #8
- Rep Power
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.
8th May 2008, 05:58 PM #9
I hope that's wrong
Originally Posted by diagram
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
8th May 2008, 07:50 PM #10
Easiest way I've found of shutting down machines is to create two batchfiles.
Set one to run at machine startup with the commands;
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.
at /DELETE /YES
at 21:00 /every:M,T,W,Th,F "\\domain\netlogon\shutdwn.bat"
Then in the shutdwn.bat file, simply use this command
Which obviously calls the windows built in shutdown command, and displays the appropreate message.
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."
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!
2 Thanks to maniac:
Alis_Klar (20th January 2011), gshaw (9th May 2008)
9th May 2008, 11:35 AM #11
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
9th May 2008, 12:40 PM #12
Cheers for that maniac, I like the look of that method - going on the test area now
16th May 2008, 02:41 PM #13
Hey, that sounds a brilliant idea.
Originally Posted by maniac
Definitely on my list for sorting - after Ofsted next week...
Now if only we could do the same for WOL...
19th May 2008, 12:27 PM #14
- Rep Power
Hey Mike, how did you get around users having no access to at.exe?
19th May 2008, 01:14 PM #15
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.
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.
By localzuk in forum Hardware
Last Post: 26th February 2013, 04:22 PM
By tech_guy in forum Windows
Last Post: 18th February 2010, 12:29 AM
By SpuffMonkey in forum Scripts
Last Post: 6th November 2008, 02:59 PM
By gshaw in forum Windows
Last Post: 23rd April 2008, 09:11 PM
Last Post: 26th October 2006, 12:48 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread