Académique Documents
Professionnel Documents
Culture Documents
> Command-Line Tools Technical Reference
>
Powercfg Command-Line Options Any suggestions?
powercfg [-l] [-q ] [-x] [-changename] [-duplicatescheme] [-d] [-deletesetting] [-setactive] [-getactivescheme] [-
setacvalueindex] [-setdcvalueindex] [-h] [-a] [-devicequery] [-deviceenablewake] [-devicedisablewake] [-import] [-export] [-
lastwake] [-?] [-aliases] [-setsecuritydescriptor] [-getsecuritydescriptor]
Option
Description
-l Example:
powercfg -list
- query [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
If SUB_GUID is not specified, all settings in the specified power scheme are
displayed.
setting
- 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
Example:
This sets the monitor idle timeout value to five minutes when operating on AC
power.
- changename GUID name Modifies the name of a power scheme and, optionally, the scheme description.
[scheme_description]
Usage:
GUID
Name
scheme_description
- duplicatescheme GUID [DestinationGUID] Duplicates the specified power scheme. The resulting GUID which represents the
new scheme will be displayed.
Usage:
GUID
DestinationGUID
If DestinationGUID is omitted, then a new GUID will be created for the duplicated
scheme.
-d GUID Usage:
Powercfg –delete GUID
GUID
Specifies the GUID of the scheme. Obtained by using the -list option.
Usage:
Sub_GUID
Setting_GUID
-s Scheme_GUID Usage:
Powercfg –setactive Scheme_GUID
Scheme_GUID
Usage:
Powercfg -getactivescheme
-setacvalueindex Scheme_GUID Sub_GUID Sets a value associated with a specified power setting while the computer is
Setting_GUID SettingIndex powered by AC power.
Usage:
powercfg –setacvalueindex Scheme_GUIDSub_GUIDSetting_GUIDSettingIndex
Scheme_GUID
Sub_GUID
Setting_GUID
SettingIndex
Specifies which of the list of possible values this power setting will be set to.
Example:
This sets the power setting's AC value to the fifth entry in the list of possible values
for this power setting.
-setdcvalueindex Scheme_GUID Sub_GUID Sets a value associated with a specified power setting while the computer is
Setting_GUID SettingIndex powered by DC power.
Usage:
Scheme_GUID
Sub_GUID
Setting_GUID
SettingIndex
Specifies which of the list of possible values this power setting will be set to.
Example:
This sets the power setting's DC value to the fifth entry in the list of possible values
for this power setting.
-hibernate [on|off] Enables or disables the hibernate feature. Hibernate timeout is not supported on all
computers.
-h [on|off]
Example: powercfg-h on
-availablesleepstates Reports the sleep states available on the computer. Attempts to report reasons why
sleep states are unavailable.
-a
Usage:
powercfg –devicequery query_flags
query_flags
wake_from_any – Returns all devices that support waking the computer from any
sleep state.
wake_armed – Lists devices that are currently configured to wake the computer
from any sleep state.
Example:
-deviceenablewake devicename Enables the device to wake the computer from a sleep state.
Usage:
powercfg –deviceenablewake devicename
devicename
Example:
-devicedisablewake devicename Disables the device from waking the computer from a sleep state.
Usage:
powercfg –devicedisablewake devicename
devicename
-import filename [GUID] Imports all power settings from the specified file.
Usage:
filename
GUID
(optional) Represents the settings loaded into a power scheme. If not supplied,
Powercfg will generate and use a new GUID
Example:
-export filename GUID Exports a power scheme, represented by the specified GUID, to the specified file.
Usage:
filename
GUID
Example:
-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.
Usage:
GUID
Action
SDDL
-getsecuritydescriptor [GUID|Action] Gets a security descriptor associated with a specified power setting, power scheme,
or action.
Usage:
GUID
Action
See Also
Concepts
Command-Line Tools Technical Reference
Community Additions AD
D
BAttery loading Problem after upgrading to Win 10: (Although the Netbook is fully functionnal)
(Power cable disconnected) battery goes normally smotthly down according to usage.
-
Connecting the power cable, Battery does load for 10 sec max and then stops loading ! (whatever the battery load level)
- By removing/ reconnecting the cable every 10 sec, th ebatttery loads upto 53 to 55% max and then can't increase above.
- This situation is repeatable... and green light of the battery stays on.
' Why microft is so silent on surch a long issue rporte in all the blogs since Win 8 ?
'
Olivier 57
2/13/2016
Mr
Famous Belgian
Olivier 57
2/13/2016
intel copppp
10/14/2015
I can use SCHEME_CURRENT in other commands, but how do we find out sub guid generic \ friendly names?
-Mr Happy-
1/8/2015
Spelling Error
-setsecruitydescriptor
[
GUID
|
Action
]
SDDL
should be
-setsecURitydescriptor
[
GUID
|
Action
]
SDDL
errant_sunset
5/29/2014
Aravind mano
2/27/2014
Utterly Futile!
Trying to run this command against schemes pushed out by GPO:
Switch -auto
Hi,
the switch -energy is documented, but the subswitch -auto wich is used in the default Taskscheduler entry "Power Efficiency Diagnostic“ is not.
Why?
Heinz-Uwe
1/29/2013
Please document: "Powercfg -setactive GUID" should be ran after any changes to the active scheme.
Could you document in the -setactive command line section that in order for changes to the active power scheme to take effect
and be applied
without a reboot that the user needs to run powercfg -setactive {Scheme_GUID} .
If the current profile you are modifying is already the "active" profile, the current wording of "Makes the specified power scheme active on the
computer" makes it sound like you should not have to run the -setactive command. But, in fact you do have to run the -setactive command in
order for any changes to be applied to the active scheme.
Keith Kepler
9/28/2012
Michael Jennings
9/1/2012
Michael Jennings
9/1/2012
can be deleted
can be deleted
LHUSSIEZ Pierre
7/11/2012
REM export
powercfg -EXPORT ./PowerCfgActiveScheme.pow %ActiveSchemeGUID%
LHUSSIEZ Pierre
7/11/2012
Disabling sleep with a task that wakes from sleep doesn't work (the computer still sleeps).
To avoid your system going to sleep during an important task you may wish to disable sleep using the command line. Unfortunately
it seems that if
you try to accomplish this through a task that itself resumes from sleep (e.g., scheduled task) it fails to achieve the desired result.
powercfg -x standy-timeout-ac 0
Post-backup (re-enables sleep, where X is the number of minutes before the system should sleep)
powercfg -x standy-timeout-ac X
The
scheduled task to wake works fine, it also disables sleep so that when you inspect it from the control panel sleep appears to be disabled,
however, confirmed by event viewer, Windows will then go back to sleep (due to Idle) even though sleep has been disabled.
Wayne Hartell
5/11/2012
This is on Windows 7 Ultimate x64. As there a difference on how to use the parameters?
ReveTahw
4/4/2012
If neither SCHEME_GUID or SUB_GUID are provided, the settings of the current user's active power scheme, including hidden settings, are
displayed. If SUB_GUID is not specified, all settings in the specified power scheme, including hidden settings, are displayed.
lauwens
12/6/2011
msharoknian
11/13/2011
I want to save the current config, change it (e.g. prevent standby and hibernate timeouts), run a long command, then restore the saved power
config and set it as the current scheme. There seems to be no command to 'export current scheme'
e.g.
Steve6375
10/10/2011
John E [MSFT]
10/3/2011
-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.
<CALLER_TYPE> Specifies one of the following caller type: PROCESS, SERVICE, DRIVER. This is obtained by calling the POWERCFG -REQUESTS
command.
<NAME> Specifies the caller name. This is the name returned from calling POWERCFG -REQUESTS command.
<REQUEST> Specifies one or more of the following Power. Request Types: Display, System, Awaymode.
Example: POWERCFG -REQUESTSOVERRIDE PROCESS wmplayer.exe Display System
To remove the power request override, use the -REQUESTSOVERRIDE option, but do not specify any type of override (System, Display, AwayMode)
as in the following example:
Example:
Thomas Lee
7/12/2011
Mark Aggar
6/24/2010