Windows 7 / Getting Started

Configuring Power Management Settings Using the Powercfg Utility

Powercfg is a command-line utility for configuring Windows 7 power management policy. Powercfg.exe exposes all power management settings, including those that are not available in the UI or from Group Policy.

Power management settings are represented by GUIDs, so using Powercfg.exe generally requires that you know the GUIDs for the settings you want to modify. However, Powercfg. exe also supports aliases for most common GUIDs, and you can type powercfg -aliases to display a list of supported aliases as shown here (the output has been truncated).

C:\Windows\system32\>powercfg -aliases

a1841308-3541-4fab-bc81-f71556f20b4a SCHEME_MAX
8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c SCHEME_MIN
381b4222-f694-41f0-9685-ff5bb260df2e SCHEME_BALANCED
fea3413e-7e05-4911-9a71-700331f1c294 SUB_NONE
238c9fa8-0aad-41ed-83f4-97be242c8f20 SUB_SLEEP
29f6c1db-86da-48c5-9fdb-f2b67b1f44da STANDBYIDLE
9d7815a6-7ee4-497e-8888-515a05f02364 HIBERNATEIDLE
94ac6d29-73ce-41a6-809f-6363ba21b47e HYBRIDSLEEP
d4c1d4c8-d5cc-43d3-b83e-fc51215cb04d REMOTEFILESLEEP
7516b95f-f776-4464-8c53-06167f40cc99 SUB_VIDEO
...

For example, this means you can type powercfg -setactive SCHEME_BALANCED instead of having to specify the GUID for the Balanced power plan.

The examples that follow illustrate the use of Powercfg.exe on Windows Vista and later systems. You can run most of these commands while logged on as a standard user, but a few, such as -export (for exporting power plans) and -h (for enabling or disabling hibernation support), must be run from an administrator-level (elevated) command prompt.

Note To display detailed help for Powercfg.exe, type powercfg /? at a command prompt.

To list the available power plans (called power schemes) in Powercfg.exe:

C:\Windows\system32\>powercfg -L

Existing Power Schemes (* Active)
-----------------------------------
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced)
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High performance) *
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)

Listing power schemes lets you determine the GUID for each scheme. The asterisk beside the High Performance scheme indicates that it is the active power plan. You can also determine the active power scheme quickly as follows.

C:\Windows\system32\>powercfg -getactivescheme
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High performance)

To display detailed information concerning the High Performance power scheme in the preceding example, see the code here (the output has been truncated).

C:\Windows\system32\>powercfg -q 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High performance)
  Subgroup GUID: fea3413e-7e05-4911-9a71-700331f1c294 (Settings
  belonging to no subgroup)
   Power Setting GUID: 0e796bdb-100d-47d6-a2d5-f7d2daa51f51 (Require
   a password on wakeup)
	Possible Setting Index: 000
	Possible Setting Friendly Name: No
	Possible Setting Index: 001
	Possible Setting Friendly Name: Yes
    Current AC Power Setting Index: 0x00000001
    Current DC Power Setting Index: 0x00000001

  Subgroup GUID: 0012ee47-9041-4b5d-9b77-535fba8b1442 (Hard disk)
    Power Setting GUID: 6738e2c4-e8a5-4a42-b16a-e040e769756e (Turn
    off hard disk after)
	Minimum Possible Setting: 0x00000000
	Maximum Possible Setting: 0xffffffff
	Possible Settings increment: 0x00000001
	Possible Settings units: Seconds
    Current AC Power Setting Index: 0x000004b0
    Current DC Power Setting Index: 0x000004b0

  Subgroup GUID: 0d7dbae2-4294-402a-ba8e-26777e8488cd (Desktop
  background settings)
    Power Setting GUID: 309dce9b-bef4-4119-9921-a851fb12f0f4 (Slide
    show)
	Possible Setting Index: 000
	Possible Setting Friendly Name: Available
	Possible Setting Index: 001
	Possible Setting Friendly Name: Paused
    Current AC Power Setting Index: 0x00000000
    Current DC Power Setting Index: 0x00000000

  Subgroup GUID: 19cbb8fa-5279-450e-9fac-8a3d5fedd0c1 (Wireless
  Adapter Settings)
    Power Setting GUID: 12bbebe6-58d6-4636-95bb-3217ef867c1a (Power
    Saving Mode)
	Possible Setting Index: 000
	Possible Setting Friendly Name: Maximum Performance
	Possible Setting Index: 001
	Possible Setting Friendly Name: Low Power Saving
	Possible Setting Index: 002
	Possible Setting Friendly Name: Medium Power Saving
	Possible Setting Index: 003
	Possible Setting Friendly Name: Maximum Power Saving
    Current AC Power Setting Index: 0x00000000
    Current DC Power Setting Index: 0x00000000...

The following code changes the active power scheme to Balanced in the preceding example.

C:\Windows\system32\>powercfg -setactive SCHEME_BALANCED

Verify the result as follows.

C:\Windows\system32\>powercfg -L

Existing Power Schemes (* Active)
-----------------------------------
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced) *
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High performance)
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)

The following code determines the available Sleep states supported by the system.

C:\Windows\system32\>powercfg -a
The following sleep states are available on this system: Standby ( S1 S3 ) Hibernate
Hybrid Sleep
The following sleep states are not available on this system:
Standby (S2)
	The system firmware does not support this standby state.

More Info For information concerning the differences between these different Sleep states, see http://msdn2.microsoft.com/en-gb/library/ms798270.aspx.

The following code displays the source that has awakened the system from sleep.

C:\Windows\system32\>powercfg -lastwake
Wake History Count - 1
Wake History [0]
  Wake Source Count - 1
  Wake Source [0]
    Type: Device
    Instance Path: ACPI\PNP0C0C\2&daba3ff&1
    Friendly Name:
    Description: ACPI Power Button
    Manufacturer: (Standard system devices)

The following code changes the monitor time-out when running on AC power for the active power scheme to 30 minutes.

C:\Windows\system32\>powercfg -setacvalueindex SCHEME_CURRENT SUB_VIDEO VIDEOIDLE 1800
C:\Windows\system32\>powercfg -setactive SCHEME_CURRENT

The following code exports a power scheme to a .pow file (proprietary binary format).

C:\Windows\system32\>powercfg -export C:\newscheme.pow
8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

Use the -import switch to import a .pow file.

The following code disables hibernation on the computer.

C:\Windows\system32\>powercfg -h off

To evaluate the energy efficiency of the computer, first close all applications and documents, let the system remain idle for 10 minutes, and then run the following command.

C:\Windows\system32>powercfg -energy
Enabling tracing for 60 seconds...
Observing system behavior...
Analyzing trace data...
Analysis complete.

Energy efficiency problems were found.

7 Errors
1 Warnings
11 Informational

See C:\Windows\system32\energy-report.html for more details.

Opening the Hypertext Markup Language (HTML) file generated by the command displays a Power Efficiency Diagnostic Report with errors, warnings, and informational issues.

Configuring Power Management Settings Using the Power WMI Provider

Windows 7 now includes a WMI provider that lets you configure power policy through the standard WMI interface. Using this provider, you can script actions such as:

  • Changing power setting values by using the Win32_PowerSetting class.
  • Activating a specific power plan by using the Win32_Plan.Activate() method.

More Info See MSDN for more information on using WMI to manage power settings in Windows 7.

[Previous] [Contents] [Next]

In this tutorial:

  1. Managing Devices and Services
  2. Understanding Device Installation and Management
  3. Device Enhancements in Windows 7
  4. Display Enhancements in Windows 7
  5. Understanding Device Installation
  6. Driver Store and Driver Packaging
  7. Driver Staging vs Installation
  8. Driver Staging and Installation Process
  9. Detailed Installation Process
  10. Managing Driver Packages
  11. Using PnPutil.exe
  12. Using Dism.exe
  13. Driver Signing
  14. Driver Ranking
  15. Installing and Using Devices
  16. Enhancements to the Device Installation Experience in Windows 7
  17. Scenario 1: Driver found in Driver Store
  18. Scenario 2: Driver found on Windows Update
  19. Scenario 3: Driver in Driver Store, But Better Driver on Windows Update
  20. Scenario 5: No Driver Can Be Found for the device
  21. Scenario 6: Vendor -supplied media is available
  22. Scenario 7: Additional Device Software is Available For Download from vendor
  23. Configuring Device Installation Settings
  24. Using the Devices And Printers Folder
  25. Understanding Device Stage
  26. Understanding the Device Experience Architecture
  27. Device Containers
  28. Device display object
  29. Device Metadata System
  30. Managing Device Installation Using Group Policy
  31. Managing Device Installation Behavior
  32. Managing Driver Installation Behavior
  33. Blocking Installation of Removable Devices
  34. Managing Device Redirection Behavior
  35. Troubleshooting Device Installation
  36. Using Windows Error Reporting
  37. Using the SetupAPI Log File
  38. Using Driver INF Files
  39. Using Device Manager Error Codes
  40. Using Driver Verifier
  41. Repairing Driver Store Corruption
  42. Repairing Index File Corruption
  43. Understanding Power Management
  44. Power Management Enhancements in Windows 7
  45. New Power Policies in Windows 7
  46. Configuring Power Management Settings
  47. Configuring Power Management Settings Using the Power Options Utility in Control Panel
  48. Configuring Power Management Settings Using Group Policy
  49. Configuring Power Management Settings Using the Powercfg Utility
  50. Understanding Services
  51. Service Enhancements in Windows 7
  52. Managing Services
  53. Managing Services Using Task Manager
  54. Managing Services Using the Sc.exe Command