+ Post New Thread
Results 1 to 12 of 12
Windows Thread, Force XP machines to shutdown at night in Technical; We use Psshutdown to shutdown all of out PC's at night but this doesn't work is someone is logged on ...
  1. #1
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,196
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74

    Force XP machines to shutdown at night

    We use Psshutdown to shutdown all of out PC's at night but this doesn't work is someone is logged on with the screen locked?

    Anyone know of a way to force Windows to shut down?

    Cheers.

  2. #2

    Join Date
    Feb 2006
    Location
    Derbyshire
    Posts
    1,381
    Thank Post
    181
    Thanked 211 Times in 171 Posts
    Rep Power
    65
    Are you using the -o (logoff local user) or -f (force close apps) switches?

    psshutdown -f -k seems to do the job here...
    Last edited by OutToLunch; 11th March 2008 at 01:03 PM.

  3. #3
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,196
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    I use psshutdown -f which seems to do the trick the -o logoff local user doesn't seem to work if the screen is locked.

    Are you saying that even if the screen is locked that -o unlocks it and forces a shutdown?


    Right i've downloaded the latest version and -o now logs off the user but that's it it doesn't reboot (sigh) and combining -o and -k doesn't seem to work. Is there a required order for the switches?

    Cheers.
    Last edited by cookie_monster; 11th March 2008 at 02:17 PM.

  4. #4

    Join Date
    Feb 2006
    Location
    Derbyshire
    Posts
    1,381
    Thank Post
    181
    Thanked 211 Times in 171 Posts
    Rep Power
    65
    I've noticed that you can't combine the o/k switches - I have to do 2 sweeps, 1 of -o then follow it with a sweep of -k. You could do it elegantly with a psloggedon call as well to work out if the machine is on and locked, but the time it takes to process that you might as well just nuke them all from orbit anyway

  5. #5
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,196
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    Ah ok what a pain.

    Do you just run one sweep a few mins before the other then?
    Last edited by cookie_monster; 11th March 2008 at 03:19 PM.

  6. #6
    enjay's Avatar
    Join Date
    Apr 2007
    Location
    Reading, Berkshire, UK
    Posts
    4,485
    Thank Post
    282
    Thanked 196 Times in 167 Posts
    Rep Power
    75
    Beyondexec will shut down locked PCs, and also force applications to close, e.g. where someone has left Word open so it pops up the "do you want to save your changes?" box. Unless I'm mistaken, pstools will sit and wait for someone to click something in that instance.

  7. #7

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,568 Times in 1,250 Posts
    Rep Power
    340

  8. #8
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,196
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    I might of missed it Michael but i didn't see a solution in that thread that used Psshutdown.


    Think i'm in bussiness now OutToLunch shame the lates version doesn't allow -0 and -k together but the two sweeps seems to be doing the trick.

    Cheers.

  9. #9

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,568 Times in 1,250 Posts
    Rep Power
    340
    I'm not sure if it mentions Psshutdown, but there are lots of solutions how you can shutdown a group of workstations automatically

  10. #10
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,196
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    That is very true ;-)

  11. #11


    Join Date
    Sep 2007
    Location
    UK
    Posts
    5,373
    Thank Post
    1,417
    Thanked 865 Times in 556 Posts
    Rep Power
    642
    psshutdown -f -k seems to work ok in one pass here.

  12. #12
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,196
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    Is that still the case if the station is locked by an administrator?

    I've tried every combination i can think of and nothing works unless the station is logged off or logged on 'without' the screen locked. If i use the -k -f switches and then unlock i can see the countdown then i re lock and it never reboots i have to use the -o switch to unlock first then -f -k to force the shutdown.
    Last edited by cookie_monster; 12th March 2008 at 03:24 PM.

SHARE:
+ Post New Thread

Similar Threads

  1. csi last night
    By russdev in forum General Chat
    Replies: 5
    Last Post: 8th November 2008, 10:40 AM
  2. Starry Night Pro 5
    By noser in forum Educational Software
    Replies: 0
    Last Post: 18th January 2008, 01:38 PM
  3. Force shutdown when laptop lid closed
    By Homer in forum Windows
    Replies: 3
    Last Post: 23rd June 2007, 07:09 PM
  4. House of Horrors last night (ITV)
    By MK-2 in forum General Chat
    Replies: 16
    Last Post: 24th May 2007, 02:06 PM
  5. Remotely Shutdown/Restart PC's at night
    By flyinghaggis in forum How do you do....it?
    Replies: 20
    Last Post: 2nd February 2006, 09:28 AM

Thread Information

Users Browsing this Thread

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

Posting Permissions

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