Use powercfg.exe to control power plans - also called power schemes - to use the available sleep states, to control the power states of individual devices, and to analyze the system for common energy-efficiency and battery-life problems.
Syntax
Powercfg command lines use the following syntax:
powercfg /option [arguments] [/?]
where option is one of the options listed in the following table, and arguments is one or more arguments that apply to the selected option. Including /? in a command line displays help for the specified option. Options and arguments are described in more detail later in this topic.
Generates a diagnostic system power transition report.
Command-line option descriptions
The following sections describe Powercfg command-line options and arguments.
-help or /?
Displays information about command-line parameters.
Syntax:
powercfg /?
/list or /L
Lists all power schemes.
Syntax:
powercfg /list
/query or /Q
Displays the contents of the specified power scheme.
Syntax:
powercfg /query [scheme_GUID] [sub_GUID]
If neither the parameter scheme_GUID or sub_GUID are provided, the settings of the current active power scheme are displayed. If the parameter sub_GUID is not specified, all settings in the specified power scheme are displayed.
Arguments:
scheme_GUID
Specifies a power scheme GUID. Running powercfg /list returns a power scheme GUID.
sub_GUID
Specifies a power-setting subgroup GUID. A power setting subgroup GUID is returned by running powercfg /query.
Displays a list of aliases and their corresponding GUIDs. These aliases may be used instead of a GUID in any command.
Syntax:
powercfg /aliases
Note
Some settings do not contain aliases. For a full list of GUIDs, use powercfg /query.
/getsecuritydescriptor
Gets the security descriptor associated with the specified power setting, power scheme, or action.
Syntax:
powercfg /getsecuritydescriptor GUID | action
Arguments:
GUID
Specifies a power scheme or a power setting GUID. A power scheme GUID is returned by running powercfg /list. A power setting GUID is returned by running powercfg /query.
Sets a security descriptor associated with the specified power setting, power scheme, or action.
Syntax:
powercfg /setsecuritydescriptor GUID | actionSDDL
Arguments:
GUID
Specifies a power scheme or a power setting GUID. A power scheme GUID is returned by running powercfg /list. A power setting GUID is returned by running powercfg /query.
action
Specifies one of the following actions:
ActionSetActive
ActionCreate
ActionDefault
SDDL
Specifies a valid security descriptor string in SDDL format. An example SDDL string can be obtained by running powercfg /getsecuritydescriptor.
Enables or disables the hibernate feature; also, sets the hiberfile size.
Syntax:
powercfg /hibernate
powercfg /hibernate [ on | off ]
powercfg /hibernate [ /size percent_size]
powercfg /hibernate [ /type reduced | full ]
Arguments:
On
Enables the hibernate feature.
Off
Disables the hibernate feature.
/size percent_size
Specifies the desired hiberfile size as a percentage of the total memory size. The default size cannot be smaller than 50. This parameter also causes hibernation to be enabled.
/type reduced | full
Specifies the desired hiberfile type. A reduced hiberfile only supports hiberboot.
Note
A hiberfile that has a custom default size, or HiberFileSizePercent >= 40, is considered as a full hiberfile. HiberFileSizePercent is set in the registry in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power.
To change the hiberfile type to reduced, the OS has to manage the default hiberfile size. To do this, run the following commands:
wake_programmable Lists devices that are user-configurable to wake the system from a sleep state.
wake_armed Lists devices that are currently configured to wake the system from any sleep state.
all_devices Returns all devices present in the system.
Examples:
powercfg /devicequery wake_armed
/deviceenableawake
Enables the specified device to wake the system from a sleep state.
Syntax:
powercfg /deviceenableawake device_name
Arguments:
device_name
Specifies a device. This device name may be retrieved using powercfg /devicequery wake_programmable.
Examples:
powercfg /deviceenableawake "Microsoft USB IntelliMouse Optical"
/devicedisablewake
Disables the specified device from waking the system from a sleep state.
Syntax:
powercfg /devicedisablewake device_name
Arguments:
device_name
Specifies a device. This device name may be retrieved using powercfg /devicequery wake_armed.
Examples:
powercfg /devicedisablewake "Microsoft USB IntelliMouse Optical"
/lastwake
Reports information about what woke the system from the last sleep transition.
Syntax:
powercfg /lastwake
/waketimers
Enumerates the active wake timers. If enabled, the expiration of a wake timer wakes the system from sleep and hibernate states.
Syntax:
powercfg /waketimers
/requests
Enumerates application and driver Power Requests. Power Requests prevent the computer from automatically powering off the display or entering a low-power sleep mode.
Syntax:
powercfg /requests
/requestsoverride
Sets a Power Request override for a particular process, service, or driver. If no parameters are specified, this command displays the current list of Power Request overrides.
Generates a report of battery usage characteristics over the lifetime of the system. Running powercfg /batteryreport generates an HTML report file in the current path.
Generates a diagnostic report of modern standby quality over the last three days on the system. The report is a file that is saved in the current path.
Generates a report of intervals when the user was not present over the last three days on the system, and if the system went to sleep. This option generates a report, an HTML file, in the current path.
This command requires administrator privileges and must be executed from an elevated command prompt.
Generates a report of system power transitions over the last three days on the system, including connected standby power efficiency. This option generates a report, an HTML file, in the current path.
This command requires administrator privileges and must be executed from an elevated command prompt.
Syntax:
powercfg /getsecuritydescriptor GUID | action
Arguments:
/output file_name
Specifies the path and file name of the diagnostics report.
/xml
Save the report as an XML file.
/duration days
Specifies the number of days to analyze for the report.
/transformxml file_name
Produces a report in HTML from a report that was previously created in XML.
Overlay power schemes and PPM profiles can now be customized through powercfg.exe. It is important to note that overlay schemes are now limited to customizing settings that affect performance versus power savings tradeoff. This is currently related to settings under the PPM and Graphics power settings subgroups (with aliases SUB_PROCESSOR and SUB_GRAPHICS in powercfg). Attempts to write to other subgroups under overlay schemes will result in an error message.
Reading from overlay schemes
The powercfg commands used earlier to read power schemes now support overlay schemes as well for reads and writes.
All arguments after the /q flag are optional. If the setting alias is not specified, all settings under the specified overlay scheme and subgroup will be enumerated. If the subgroup is not specified, then all settings for all subgroups under the specified overlay scheme will be enumerated. If the overlay scheme is not specified, then it will be assumed to be the currently active overlay scheme (if active) or the current power scheme (if no overlay is active).
Writing to overlay schemes
The commands setacvalueindex and setdcvalueindex now support overlay schemes as well.
PPM profile aliases are visible by running the same powercfg /aliasesh command. Support for missing arguments is provided, and the behavior is similar to when arguments are missing and the /q flag is used.
Writing to PPM profile
For writing to PPM profiles, the /setacprofileindex and /setdcprofileindex commands can be used.
For enumerating PPM profiles which have at least one power setting value explicitly set.
Syntax:
powercfg /listprofiles
powercfg /lp
Provisioning XML Generation Support
Powercfg now supports automatically generating a provisioning XML file that can be used as an input to Windows Configuration Designer in order to generate a provisioning package (.ppkg) that contains the customized settings from a device under test. This file contains all settings on the device with the "RUNTIME_OVERRIDE" altitude value.
This section contains information about the power settings that you can configure using the Windows provisioning framework. Each power setting topic includes the allowed values, meaning, and common usage scenarios for the setting.