cookie_monster Posted March 11, 2008 Posted March 11, 2008 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.
OutToLunch Posted March 11, 2008 Posted March 11, 2008 (edited) Are you using the -o (logoff local user) or -f (force close apps) switches? psshutdown -f -k seems to do the job here... Edited March 11, 2008 by OutToLunch
cookie_monster Posted March 11, 2008 Author Posted March 11, 2008 (edited) 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. Edited March 11, 2008 by cookie_monster
OutToLunch Posted March 11, 2008 Posted March 11, 2008 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
cookie_monster Posted March 11, 2008 Author Posted March 11, 2008 (edited) Ah ok what a pain. Do you just run one sweep a few mins before the other then? Edited March 11, 2008 by cookie_monster
enjay Posted March 11, 2008 Posted March 11, 2008 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.
cookie_monster Posted March 11, 2008 Author Posted March 11, 2008 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.
Michael Posted March 11, 2008 Posted March 11, 2008 I'm not sure if it mentions Psshutdown, but there are lots of solutions how you can shutdown a group of workstations automatically
laserblazer Posted March 12, 2008 Posted March 12, 2008 psshutdown -f -k seems to work ok in one pass here.
cookie_monster Posted March 12, 2008 Author Posted March 12, 2008 (edited) 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. Edited March 12, 2008 by cookie_monster
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now