gshaw Posted April 23, 2008 Posted April 23, 2008 (edited) I'm using psshutdown on our teaching PCs to shut them down after 10pm but would like to log the results of the batch file as some aren't working, I think due to some odd security settings from a while back. Tried piping the cmd batch file output to a text file but it only shows the commands psshutdown runs e.g. shutting down PC06 but no output e.g. shutdown successful Anyone got a logging system set up? Thanks Edited April 23, 2008 by gshaw
srochford Posted April 23, 2008 Posted April 23, 2008 Not sure that you'll be able to do this - I think that all psshutdown does is to tell the computer to shut down and, provided that the PC accepts this, then you get "OK" back. If it fails to shutdown (eg box pops up saying "Save your work?" then psshutdown will know nothing about it. What you could do is wait (say) 5 minutes and then try and ping the machines you tried to shut down; if they reply then your shutdown failed. When you say "odd security settings", do you know what or is this one of those things you've inherited?? I know you can prevent an interactive shutdown and you can prevent remote RPC connections but I can't think of anything else!
gshaw Posted April 23, 2008 Author Posted April 23, 2008 (edited) From digging through the policies it seems the previous admin has restricted "access this computer over the network" and a few others through User Rights Assignment on the Computer GPO. Other machines were making out that they weren't contactable (as in psshutdown could't get a response) yet when I ran the script one by one they shut down OK - script runs with admin rights so shouldn't have a problem there. It's currently set as a scheduled task. Gonna reset those policies back to Not Defined when I build up a new policy for the Teaching Machines, to go with the new shiny mandatory profiles I'm using rather than HDGuard (similar to Deepfreeze) and setting each machine's user settings manually () No more AntiVirus update problems and ability to use SMS software distribution without worrying HDGuard's there ready to wipe it on reboot Edited April 23, 2008 by gshaw
steve Posted April 23, 2008 Posted April 23, 2008 How about a scheduled task about 30 mins later: net view > pcslefton.txt combine this with bmail to email the log to yourself.
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