Powercfg
Updated: April 17, 2012
Applies To: Windows 7, Windows Server 2008 R2
Control power settings and configure computers to default to Hibernate or Standby modes.
The Powercfg.exe tool is installed with Windows.
Syntax
powercfg [/l[ist]] [/q[uery] [<Scheme_GUID>] [<Sub_GUID>]] ] [/x <setting> <value>] [/changename <GUID> <name> [<scheme_description>]] [/duplicatescheme <GUID> [<DestinationGUID>]] [/d[elete] <GUID>] [/deletesetting <Sub_GUID> <Setting_GUID>] [/s[etactive] <Scheme_GUID>] [/getactivescheme] [/setacvalueindex <Scheme_GUID> <Sub_GUID> <Setting_GUID> <SettingIndex>] [/setdcvalueindex <Scheme_GUID> <Sub_GUID> <Setting_GUID> <SettingIndex>] [/h[ibernate] [on|off]] [/a[vailablesleepstates]] [/devicequery <query_flags>] [/deviceenablewake <devicename>] [/devicedisablewake <devicename>] [/import <filename> [<GUID>]] [/export <filename> [<GUID>]] [/lastwake] [/aliases] [/setsecuritydescriptor [<GUID>|<Action>] <SDDL>] [/getsecuritydescriptor [<GUID>|<Action>]] [/requests] [/requestsoverride <Caller_type> <Name> <Request>] [/energy [/output <filename>] [/xml] [/duration <seconds>] [/trace [/d <filepath>]] [/waketimers][/?]
Parameters
Parameter | Description | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
/list /l |
Lists all power schemes in the current user's environment. |
||||||||||||||||||||||||||
/q[uery] [<Scheme_GUID>] [<Sub_GUID>] |
Displays the contents of the specified power scheme. <SCHEME_GUID> (Optional) Specifies the GUID of the power scheme to display. Can be obtained by using the powercfg /l command. <SUB_GUID> (Optional) Specifies the GUID of the subgroup to display. Requires a <SCHEME_GUID> to be provided. If neither <SCHEME_GUID> or <SUB_GUID> are provided, the settings of the current user's active power scheme are displayed. If <SUB_GUID> is not specified, all settings in the specified power scheme are displayed. |
||||||||||||||||||||||||||
<Scheme_GUID> |
Specifies the GUID of the power scheme to display. |
||||||||||||||||||||||||||
<Sub_GUID> |
Specifies the GUID of the subgroup to display. |
||||||||||||||||||||||||||
/change <setting> <value> /x <setting> <value> |
Modifies a setting value in the current power scheme. <setting> Specifies one of the following settings: /monitor/timeout/ac <minutes> /monitor/timeout/dc <minutes> /disk/timeout/ac <minutes> /disk/timeout/dc <minutes> /standby/timeout/ac <minutes> /standby/timeout/dc <minutes> /hibernate/timeout/ac <minutes> /hibernate/timeout/dc <minutes> <value> Specifies the value in minutes. |
||||||||||||||||||||||||||
/changename <GUID> <name> [<scheme_description>] |
Modifies the name of a power scheme and, optionally, the scheme description.
If the description is omitted, then only the name will be changed. |
||||||||||||||||||||||||||
/duplicatescheme <GUID> [<DestinationGUID>] |
Duplicates the specified power scheme. The resulting GUID which represents the new scheme will be displayed.
|
||||||||||||||||||||||||||
/d[elete] <GUID> |
Deletes the power scheme with the specified GUID. <GUID> Specifies the GUID of the scheme. Obtained by using the powercfg /l command. |
||||||||||||||||||||||||||
/deletesetting <Sub_GUID> <Setting_GUID> |
Deletes a power setting.
|
||||||||||||||||||||||||||
/s[etactive] <Scheme_GUID> |
Makes the specified power scheme active on the computer. <Scheme_GUID> Specifies the scheme GUID. |
||||||||||||||||||||||||||
/getactivescheme |
Retrieves the currently active power scheme. |
||||||||||||||||||||||||||
/setacvalueindex <Scheme_GUID> <Sub_GUID> <Setting_GUID> <SettingIndex> |
Sets a value associated with a specified power setting while the computer is powered by AC power.
|
||||||||||||||||||||||||||
/setdcvalueindex <Scheme_GUID> <Sub_GUID> <Setting_GUID> <SettingIndex> |
Sets a value associated with a specified power setting while the computer is powered by DC power.
|
||||||||||||||||||||||||||
/h[ibernate] [on|off] |
Enables or disables the hibernate feature. Hibernate timeout is not supported on all computers. |
||||||||||||||||||||||||||
/a[vailablesleepstates] |
Reports the sleep states available on the computer. Attempts to report reasons why sleep states are unavailable. |
||||||||||||||||||||||||||
/devicequery <query_flags> |
Returns a list of devices that meet the specified criteria. <query_flags> Specifies one of the following criteria:
|
||||||||||||||||||||||||||
/deviceenablewake <devicename> |
Enables the device to wake the computer from a sleep state. <devicename> Specifies a device retrieved by using the powercfg /devicequery wake_programmable command. Example: |
||||||||||||||||||||||||||
/devicedisablewake <devicename> |
Disables the device from waking the computer from a sleep state. <devicename> Specifies a device retrieved by using the powercfg /devicequery wake_armed command. |
||||||||||||||||||||||||||
/import <filename> [<GUID>] |
Imports all power settings from the specified file. <filename> Specifies a fully qualified path to a file generated by using the /export command-line option. <GUID> (optional) Represents the settings loaded into a power scheme. If not supplied, Powercfg will generate and use a new GUID |
||||||||||||||||||||||||||
/export <filename> [<GUID>] |
Exports a power scheme, represented by the specified GUID, to the specified file. <filename> Specifies a fully qualified path to a destination file. <GUID> Specifies a power scheme GUID. Obtained by using the /l command-line option. |
||||||||||||||||||||||||||
/lastwake |
Reports information about the event that woke the computer from the last sleep transition. |
||||||||||||||||||||||||||
/aliases |
Displays all aliases and their corresponding GUIDs. The user may use these aliases in place of any GUID at the command prompt |
||||||||||||||||||||||||||
/setsecruitydescriptor [<GUID>|<Action>] <SDDL> |
Sets a security descriptor associated with a specified power setting, power scheme, or action. <GUID> Specifies a power scheme or a power setting GUID. <Action> Specifies one of the following strings: ActionSetActive, ActionCreate, ActionDefault <SDDL> Specifies a valid security descriptor string in SDD format. Use powercfg /getsecuritydescriptor to see an example SDDL STRING. |
||||||||||||||||||||||||||
/getsecuritydescriptor [<GUID>|<Action>] |
Gets a security descriptor associated with a specified power setting, power scheme, or action. <GUID> Specifies a power scheme or a power setting GUID. <Action> Specifies one of the following strings: ActionSetActive, ActionCreate, ActionDefault |
||||||||||||||||||||||||||
/requests |
Enumerate application and driver Power Requests. Power requests prevent the computer from automatically powering off the display or entering a low-power sleep mode. |
||||||||||||||||||||||||||
/requestsoverride <Caller_type> <Name> <Request> |
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.
|
||||||||||||||||||||||||||
/energy |
Analyzes the system for common energy-efficiency and battery life problems. The /energy command should be used when the computer is idle and with no open programs or documents. The /energy command will generate an HTML report file in the current path.
|
||||||||||||||||||||||||||
/waketimers |
Enumerates the active wake timers. If enabled, the expiration of a wake timer wakes the system from sleep and hibernate states. |
||||||||||||||||||||||||||
/? |
Displays Help at the command prompt. |
Examples
To set the monitor idle timeout value to five minutes when operating on AC power:
powercfg /change /monitor/timeout/ac 5
To set the power setting's AC value to the fifth entry in the list of possible values for this power setting:
powercfg /setacvalueindex <Scheme_GUID> <Sub_GUID> <Setting_GUID> 5
To set the power setting's DC value to the fifth entry in the list of possible values for this power setting:
powercfg /setdcvalueindex <Scheme_GUID> <Sub_GUID> <Setting_GUID> 5
To enable the Microsoft USB IntelliMouse Explorer device to wake the computer from a sleep state:
powercfg /deviceenablewake "Microsoft USB IntelliMouse Explorer"
To import all power settings from the scheme.pow file:
powercfg /import c:\scheme.pow
To export a power scheme, represented by the GUID 381b4222/f694/41f0/9685/ff5bb260df2e to the scheme.pow file:
powercfg /export c:\scheme.pow 381b4222/f694/41f0/9685/ff5bb260df2e