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.