One of the new feature of Group Policy Preferences in Windows 7 and Windows Server 2008 R2 is support for configuring power plans using preferences for Windows Vista and later (see Image 1). You used to be able to control power management in Vista using native policies however the advanced targeting of preferences now enables lot of new scenarios with power savings. AWSOME!
Image 1. Creating a new Windows Vista and Later Power Plan
One of the really neat things that you can do with Group Policy Preferences (GPPâ€™s) and Targeting is change the power scheme of a computer based on the time of the day and the day of the week. This allows you to apply more aggressive power plans to your workstations after hours but then then back off during the day when people are working. Even though that Windows Vista (and Windows 7) support adaptive display time out which backs off the screen saver timeout when a user is still sitting at a computer but not actively using it they still have to wake up the computer by before the timeout started to back off. Applying the less aggressive power plan during working hours means that the user is less likely to have to keep waking up their computer in the first place as you have configured longer time out values.
Now if this sounds familiar youâ€™d be right as I did demo some of this during my TechEd Australia Group Policies session that I did with Lilia Gutnik and it is similar to the TechNet Edge video by Michael Kleef and Mark Gray. But in this article I am going to diving a lot deeper than my demo or in the TechNet Edge video.
So before we talk about how to do this first lets go over what we are trying to achieve. We are assuming you manage a fleet of workstations that are only used during standard business hours and afterhours you want the computers to go to use as little as power as possible. You want to apply different power plans to the computers not only based on the day of the week but also the time of the day to make sure you get maximum possible power savings (see Image 2).
Image 2. Example power plan timetable
So to do this we setup two separate power plans, with one that is applied by default all the time and the other one that will take precedence and apply during business hours.
How to setup the Default Power Plan Policy
Step 1. Create a Power Plan under the User Configuration option of a GPO that has has aggressive power savings configured without any targeting other than being applied to all the users you want to control the power plans. I will leave the exact details of the power plan up to you but I will recommend that if you are going to set the â€œSleepâ€ timeout for Windows Vista (or greater) then make sure you also enable the â€œAllow hybrid sleepâ€ option (even on your desktops) (see Image 3.) as this will protect your computers from data loss if you lose power to your office environment afterhours.
Image 3. Enable hybrid sleep mode
Step 2. Rename the item to be called something like â€œDefault Power Planâ€ (see Image 4) and also make sure that it is always set to order number one.
WARNING â€“ If you do this make sure you either immediately disable the item (tool bar > red circle â€œdisable this itemâ€) or setup the Business Hours Power Plan straight away so that you don’t start shutting down all your computer during the middle of the day.
Image 4. Default Power Plan at Order 1
How to setup the Business Hours Power Plan Policy
Step 3. Create another Power Plan setting item called â€œBusiness Hours Power Planâ€ (see Image 5.) making sure it is lower order than the default power plan. Again I will leave the exact settings up to you but this one should be less aggressive than your default power plan.
Image 5. Business Hours Power Plan
Step 4. Now go into the properties of the â€œBusiness Hours Power Planâ€
Step 5. Click on the Common Tab and tick â€œItem-Level Targetingâ€
Step 6. Click on the targeting button
First of all we are going to create a collection that will target the Business House Power Plan to only the weekdays of the week.
Step 7. In the targeting Editor click on â€œAdd Collectionâ€ (see Image 6.)
Image 6. Creating a targeting collection
Step 8. Click on the â€œNew Itemâ€ and then click on â€œDate Matchâ€ (see Image 7 & 8.)
Image 7. Creating a Date Match rule
Image 8. Date match rule before being dragged into a Collection
Step 9. Now you will need to drag the â€œAND the day of the week is Sundayâ€ onto the â€œthe collection is trueâ€ and change the day to â€œMondayâ€ (see Image 9.)
Image 9. Date Match rule after being dragged in the collection.
Step 10. Now make sure that â€œthe day of the week is Mondayâ€ is highlighted and click CTRL-C once and CTRL-V four times to copy and paste the date match rule once for each weekday (see Image 10).
Image 10. Five date match rules in one collection
Step 11. Now click on each of the â€œAND the day of the week is Mondayâ€ and press F6 to change each date match rule from and â€œANDâ€ to a â€œORâ€ and then change the days to Tuesday , Wednesday, Thursday and Friday (see Image 11).
Image 11. Data Range Collection configured to apply only during weekdays
Now we will add a Time Range option that will refine when we target the Business House Power Plan to just working hours of the weekdays.
Step 12. Click on the â€œthis collection is trueâ€ and then click on â€œNew Itemâ€ and then click on â€œTime Rangeâ€ (see Image 12).
Image 12. Adding Time Range to targeting
Step 13. Now configured the time range to when during the day you want to Business Hours Power Plan to apply (see Image 13).
Note – Make sure you allow for the policy refresh interval (default 90 minutes with a 20% random offset) when configuring the start and end time. This means you might want to start applying the policy 2 hours before the start of business (e.g. 6:30am) to make sure all the computers are configured with the Business Hours Power Plan before people login in the morning (e.g. 8:30am).
Image 13. Targeting configured with Date Range collection and a Time Range
Now you have configured a Group Policy Preference to apply less aggressive power plans to your computer during business hours while still having more aggressive power plans applied after hours.
Other Option – More user Control
In the example above we just modified the â€œBalancedâ€ power plan setting when we wanted to make changes to the power settings. If you did not want to give your users some more control and not force specific power plans you could just select the â€œHigh performanceâ€œ plan and tick â€œSet as the active power planâ€ for the Business Hours Power Plan (see Image 14) and the â€œPower Saverâ€ plan as active in the Default Power plan (see Image 15).
Image 14. Setting the High Performance plan as active
Image 15. Setting the Power Saver plan as active
This way your users can still configure each of the power plans to their own preference but you will still make sure that the â€œPower Saverâ€ plan will be applied to your computers after hours. However as you are only setting which plan is active then your users could get around the power plan as by configure both plans to never time out thus negating the benefit of any of the planâ€™s.
Other Options â€“ Less aggressive Default Power Plan
You may also want to set the default power policy to be less aggressive by default and then apply the aggressive power as the second item in the list using a little more complicated targeting (see Image 16). The advantage of this method is you can easily turn off the aggressive power savings plan when you want to do afterhours by just disabling the â€œAfterhours Power Planâ€.
Image 16. Targeting to apply plan only afterhours