Scheduling a Automatic Shutdown without Blindsiding Users
Novell Cool Solutions: Trench
By Matt Colwell
Digg This -
Posted: 23 Jan 2004
The following Cool Solution will allow you to schedule an automatic shutdown time for your ZEN managed workstations. It will allow you to prompt the user before shutdown, so if someone's working late it won't shutdown their computer in the middle of their work.
This solution was developed using ZfD 4 with WinXP. I don't see any reason why it shouldn't work with any Windows workstation OS, but I have yet to test it.
Poweroff is a freeware app written by Jorgen Bosman. He's given me permission to mention his software in this Cool Solution. The software can be obtained from his website under the Application link. The URL is http://users.pandora.be/jbosman/ His software will do a lot more than just shutdown a workstation - but for this Cool Solution we'll only be using the command line options of his program.
- Copy poweroff.exe into a directory that your workstation objects have read and file scan rights to.
- Create (or modify an existing) workstation policy package. Under the policies tab of the workstation policy package, click the Add button to create a scheduled action policy. This will require that you give the scheduled action a name. Use something creative like 'Auto Shutdown at 5pm'.
- Edit the properties of the Auto Shutdown policy you created in Step 2. Click the Add button to add an action. Add the UNC name of the poweroff.exe application (i.e. \\server\vol\dir\poweroff.exe). Add the UNC name of the working directory of the poweroff.exe application (i.e. \\server\vol\dir). Set the priority to above normal.
- The parameter's line will vary depending on how you want to shut the machines down. Execute 'poweroff -?' to get a list of command line options.
I use the following options: poweroff -force -warn -warntime 60 -msg "Computer will shutdown in 60 seconds. CLICK CANCEL TO STOP AUTOMATIC SHUTDOWN!!" This set of options gives users a 60-second warning and close all open applications before turning the computer off.
After setting up the action, click on OK to save changes.
NOTE: poweroff is a command line option, as well as the name of the exe. The exact syntax if running this from a command prompt would be poweroff.exe poweroff -force -warn -warntime 60 -msg "Computer will shutdown in 60 seconds. CLICK CANCEL TO STOP AUTOMATIC SHUTDOWN!!". WARNING: Use of these options will shut down the computer regardless of whether a user has saved their work or not.
- Click on the Policy Schedule tab to setup when you want the machines to shutdown. This will vary depending on your environment. I've setup our student machines to attempt shutdown at 3:25pm, stop attempting at 8:30pm, and repeat the attempt every hour.
IMPORTANT: In order for the poweroff application to prompt the user for shutdown you must set the following options. Under the Policy Schedule tab, click on Advanced Settings. Under the Impersonation tab set option to 'Unsecure System'.
- Now you need to make sure you've got all your ZEN associations in a row. I use workstation groups for all workstation policy associations. Just create a workstation group, add the desired workstations to it and associate the group with a workstation policy.
Now your workstations should shutdown at the time you want -- saving your company money on electricity... money that can be used for a raise or bonus.
If you have any questions you may contact Matt at firstname.lastname@example.org
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com