+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
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 ...
  1. #1

    Join Date
    May 2008
    Location
    Irlanda del Norte
    Posts
    36
    Thank Post
    10
    Thanked 1 Time in 1 Post
    Rep Power
    14

    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.

  2. #2
    richard.thomas's Avatar
    Join Date
    Sep 2007
    Posts
    491
    Thank Post
    5
    Thanked 11 Times in 10 Posts
    Rep Power
    17
    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?

  3. #3
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,529
    Thank Post
    108
    Thanked 89 Times in 75 Posts
    Blog Entries
    47
    Rep Power
    40
    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

  4. #4
    ICT_GUY's Avatar
    Join Date
    Feb 2007
    Location
    Weymouth
    Posts
    2,269
    Thank Post
    683
    Thanked 283 Times in 204 Posts
    Rep Power
    106
    Try LanShutdown from lantricks, saves a lot of hassle.

  5. #5
    Ravening_Wolf's Avatar
    Join Date
    Oct 2006
    Location
    Essex :(
    Posts
    290
    Thank Post
    1
    Thanked 3 Times in 3 Posts
    Rep Power
    18
    Could be timeouts caused by multiple stations accessing the same txt file at once?

  6. #6

    Join Date
    May 2008
    Location
    Irlanda del Norte
    Posts
    36
    Thank Post
    10
    Thanked 1 Time in 1 Post
    Rep Power
    14
    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.

  7. #7
    Joanne's Avatar
    Join Date
    Nov 2007
    Location
    Lancashire
    Posts
    1,974
    Thank Post
    210
    Thanked 235 Times in 189 Posts
    Blog Entries
    17
    Rep Power
    114
    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?

  8. #8

    Join Date
    May 2008
    Location
    Irlanda del Norte
    Posts
    36
    Thank Post
    10
    Thanked 1 Time in 1 Post
    Rep Power
    14
    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!

  9. #9
    gshaw's Avatar
    Join Date
    Sep 2007
    Location
    Essex
    Posts
    2,699
    Thank Post
    171
    Thanked 224 Times in 207 Posts
    Rep Power
    68
    Quote Originally Posted by diagram View Post
    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

  10. #10

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,070
    Thank Post
    210
    Thanked 430 Times in 310 Posts
    Rep Power
    144
    Easiest way I've found of shutting down machines is to create two batchfiles.

    Set one to run at machine startup with the commands;

    Code:
    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

    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."
    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.

  11. 2 Thanks to maniac:

    Alis_Klar (20th January 2011), gshaw (9th May 2008)

  12. #11
    richard.thomas's Avatar
    Join Date
    Sep 2007
    Posts
    491
    Thank Post
    5
    Thanked 11 Times in 10 Posts
    Rep Power
    17
    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

  13. #12
    gshaw's Avatar
    Join Date
    Sep 2007
    Location
    Essex
    Posts
    2,699
    Thank Post
    171
    Thanked 224 Times in 207 Posts
    Rep Power
    68
    Cheers for that maniac, I like the look of that method - going on the test area now

  14. #13

    Join Date
    Apr 2008
    Location
    Keighley, West Yorks
    Posts
    377
    Thank Post
    57
    Thanked 52 Times in 46 Posts
    Rep Power
    22
    Quote Originally Posted by maniac View Post
    Easiest way I've found of shutting down machines is to create two batchfiles.

    Set one to run at machine startup with the commands;

    Code:
    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.

  15. #14

    Join Date
    May 2008
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hey Mike, how did you get around users having no access to at.exe?

  16. #15

    Join Date
    Apr 2008
    Location
    Keighley, West Yorks
    Posts
    377
    Thank Post
    57
    Thanked 52 Times in 46 Posts
    Rep Power
    22
    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

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Pre-terminated fibre runs
    By localzuk in forum Hardware
    Replies: 10
    Last Post: 26th February 2013, 03:22 PM
  2. PsShutdown help needed!
    By tech_guy in forum Windows
    Replies: 13
    Last Post: 17th February 2010, 11:29 PM
  3. Psshutdown problem
    By SpuffMonkey in forum Scripts
    Replies: 7
    Last Post: 6th November 2008, 01:59 PM
  4. Logging psshutdown?
    By gshaw in forum Windows
    Replies: 3
    Last Post: 23rd April 2008, 08:11 PM
  5. MAC OS X 10.4.8 runs on any PC
    By ITWombat in forum Mac
    Replies: 4
    Last Post: 26th October 2006, 11:48 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •