At work we have a Windows 2008 domain with PC clients running XP, Win 7 etc.
In an attempt to reduce our carbon footprint the IT department (ie. me) has been requested told to make sure all of our PCs are powered off at night – and that we can’t afford to pay for software to do this.
The simplest way I’ve found to do this is using the shutdown command built into XP & Win 7. Basically, a scheduled task configured with a 10 minute warning that your PC is to be shutdown and that if you want to be abort the shutdown click on a desktop icon labelled “Abort Shutdown”. The scheduled task and icon are both then deployed from the server using group policy.
Shutdown Abort Icon Link:
C:\Windows\System32\shutdown.exe -a
Shutdown Scheduled Task:
C:\windows\system32\shutdown.exe /s /t 600 /d P:0:0 /c "Your Computer will be shutdown in 10 minutes to save energy. To cancel this, please double click the abort shutdown message on your desktop"
This task gives a warning of 10 minutes (600 seconds) and records the reason code of the shutdown as Planned, Other in the event log and gives the message in quotes to the user.
Head over to your server desktop, open up group policy editor, and navigate to:
Computer Configuration -> Preferences -> Windows Settings -> Shortcuts
Once you’re there create a new shortcut to the command shown above and add it to the All Users Desktop.
I recommend that you wait a couple of days before you deploy the shutdown script to ensure that all your users have the abort shutdown icon and understand what it means before their computers starting turning off magically!
To add the scheduled task, back in Group Policy Editor, navigate to:
Computer Configuration -> Preferences -> Control Panel Settings -> Scheduled Tasks
From here, you can create your new task, and configure the scheduling to your tastes. Our task runs every 30 minutes from 7PM until 5AM daily with the exception of Tuesday evenings to allow for MS updates. Our office has staff working typically between 9AM and 6PM so this seems to work well. The reason for continually re-running it is for those who are working late and then leave without turning their machines off.
Well after a month of this being in place, we’ve seen a 20% reduction in electricity consumption – in an office of 30 users that’s a big saving over a year, in terms of CO2 and cash.