Before you start
Objectives: Learn where to find and how to work with Power Plans using GUI and CMD in Windows 7.
Prerequisites: you have to know what are power plans and why do we use them.
Key terms: power, plan, options, Windows 7, configuration, command line, powercfg
We can find Power Options screen in Control Panel. The screen looks like this.
Power Options Screen in Control Panel
Here we can see three built in power plans, Balanced, Power saver and High performance. We can choose the one we want to use and we can customize the plan by clicking on the “Change plan settings” link. For example, if we try to customize the Balanced power plan, we will see this.
Power Plan Settings
So, we can choose when to dim the display or when to turn it off. We can also choose when to put the computer to sleep and adjust the brightness of the screen. If we click on the “Advanced settings” link, we will see this.
Power Plan Advanced Settings
In this window we can change advanced settings for all three power plans (we can choose the plan on the drop down list). For some options we will have to click on the “Change settings that are currently unavailable” since some of the options need elevated privileges.
Note that we can’t delete default power plans, but we can create our own custom power plan. To do that we can click on the “Create a power plan” link in Power Options.
Create a power plan Link
On the next screen we will have to choose the default plan that is closest to what we want (it will serve as a template). In our case we will select “High performance” and call it “Custom HP”.
Power Plan Template and Name
On the next few screens we will be able to choose display and sleep settings. In our case we will choose that our display never turns off and our computer never goes to sleep, and click the Create button. The new plan will then be listed on the Power Options screen.
New Power Plan Listed
We can always change settings for our new power plan. For example, if we don’t want our hard disks to turn off, we will enter 0 as a value for minutes.
Hard Disk Timer
Command Line Power Plan Options
We can also manage power options from the command line. We have to run CMD as administrator (right-click CMD and select “Run as administrator”). From the elevated command line, we can use thepowercfg command. If we want to list all available plans we can use the -list switch.
Listing Power Plans in CMD
To change to another power plan we can use the -setactive switch. We have to use the GUID of the power plan we want to change to. So, in our case, if we wanted to switch back to the Balanced power plan, we would have to enter the following command: “powercfg -setactive 381b4222-f694-41f0-9685-ff5bb260df2e”.
We can also export our settings by using the -export switch. We will have to specify the location and name of the file, and the GUID of the plan we want to export. The command looks like this: “powercfg -export C:\CustomHP 381b4222-f694-41f0-9685-ff5bb260df2e”. Now that we have our plan exported, we can import it on multiple computers by using a script.
To delete a power plan we can use the -delete switch and specify the GUID of the plan we want to delete, for example: “powercfg -delete ae6a8d04-daf8-497f-ac3d-68dff990adc6”. The plan we are trying to delete mustn’t be active.
So, we have actually deleted the CustomHP power plan that we have created earlier. Let’s now try to import the plan back by using the -import switch. The command looks like this: “powercfg -import C:\CustomHP”. If the import is successful, we will see the new GUID of the imported power plan (it will be different from the previous, despite of the same name of the plan).
Of course, we can also delete and import power plans from the GUI, and we will see the options to delete the plan if we try to change settings on the custom power plan which is not active (we can only delete custom power plans).
Delete this plan Link
To see the report of the power management settings, including diagnostics, we can use the -energyswitch. The system will be observed for some time in order to acquire data for the report. After that we will get the report in a HTML format which can be opened with the browser.
Energy Efficiency Analysis Command
Example Energy Efficiency Report
To check the devices that can wake up the computer from sleep mode (like mouse or keyboard), we can use the “-devicequery wake_from_any” switch.