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.
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?
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
Try LanShutdown from lantricks, saves a lot of hassle.
Could be timeouts caused by multiple stations accessing the same txt file at once?
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.
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?
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!

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.Code: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.Code: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!
Mike.
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![]()
Cheers for that maniac, I like the look of that method - going on the test area now![]()
Hey Mike, how did you get around users having no access to at.exe?
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)