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.
Printable View
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.
Are you using the -o (logoff local user) or -f (force close apps) switches?
psshutdown -f -k seems to do the job here...
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.
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 :D
Ah ok what a pain.
Do you just run one sweep a few mins before the other then?
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.
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.
I'm not sure if it mentions Psshutdown, but there are lots of solutions how you can shutdown a group of workstations automatically :)
That is very true ;-)
psshutdown -f -k seems to work ok in one pass here.
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.