Control power settings, configure Hibernate/Standby modes. See also the Windows XP SP2 version of PowerCfg.
Syntax
powercfg [Options]
Options
-l
-list
List the current user's power schemes (GUIDs)
-query [Scheme_GUID] [Sub_GUID]
-q [Scheme_GUID] [Sub_GUID]
Display the contents of a power scheme.
-change settingvalue
-x setting value
Modify one of the following settings in the current power scheme:
-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
Setting any value to 0 will set the timeout=Never
AC settings are used when the system is on AC power. DC settings on battery power.
-changename GUID PowerSchemeName [scheme_description]
Modify the name of a power scheme and, optionally, the scheme description.
-duplicatescheme GUID [DestinationGUID]
Duplicate a power scheme. The GUID of the new scheme will be displayed.
If DestinationGUID is omitted, then a new GUID will be created for the duplicated scheme.
-delete GUID
-d GUID
Delete the power scheme with the specified GUID.
-deletesetting Sub_GUID Setting_GUID
Delete a power setting.
-setactive Scheme_GUID
-s Scheme_GUID
Make the specified power scheme active on the computer.
-getactivescheme
Retrieve the currently active power scheme.
-setacvalueindex Scheme_GUID Sub_GUID Setting_GUID SettingIndex
Set a value associated with a specified power setting while the
computer is powered by AC power. Use the -l and -q options to discover the GUIDs
SettingIndex Specifies which value in the list to set, so 3 = 3rd in the list
-setdcvalueindex Scheme_GUID Sub_GUID Setting_GUID SettingIndex
Set a value associated with a specified power setting while the
computer is powered by DC power.
SettingIndex Specifies which value in the list to set, so 3 = 3rd in the list
-hibernate [on|off]
-h [on|off]
Enable or disable the hibernate feature. Hibernate timeout is not supported on all computers.
-availablesleepstates
-a
Report the sleep states available on the computer.
Will also attempt to report reasons why sleep states are unavailable.
-devicequery query_flags
Return a list of devices that meet the specified flags:
wake_from_S1_supported – Waking the computer from a light sleep state.
wake_from_S2_supported – Waking the computer from a deeper sleep state.
wake_from_S3_supported – Waking the computer from the deepest sleep state.
wake_from_any – Support waking the computer from any sleep state.
S1_supported – Light sleep.
S2_supported – Deeper sleep.
S3_supported – Deepest sleep.
S4_supported – Hibernation.
wake_programmable – User-configurable to wake the computer from a sleep state.
wake_armed – Currently configured to wake the computer from any sleep state.
all_devices – Present in the computer.
all_devices_verbose – Verbose list of devices.
-deviceEnableWake devicename
Enable the device to wake the computer from a sleep state.
-deviceDisableWake devicename
Disable the device from waking the computer from a sleep state.
-import filename [GUID]
Import all power settings from the specified file.
filename is the path to a file generated with powercfg -export
-export filename GUID
Export a power scheme, represented by GUID, into filename.
-lastwake
Report information about the last event that woke the computer.
-energy
Create energy-report.html in the current directory, Windows7 only.
-help
-?
Display help
-aliases
Display all aliases and their corresponding GUIDs.
These may be used in place of a GUID at the command prompt
-setsecruitydescriptor [GUID|Action] SDDL
Set a security descriptor associated with a specified power setting, power scheme, or action.
Action Is one of: ActionSetActive, ActionCreate, ActionDefault
SDDL is a valid security descriptor string in SDD format.
Call powercfg -getsecuritydescriptor to see an example SDDL STRING.
-getsecuritydescriptor [GUID|Action]
Get a security descriptor associated with a specified power setting, power scheme, or action.
Action is one of: ActionSetActive, ActionCreate, ActionDefault
Powercfg must be run from an elevated command prompt.
The most common cause of problems with power saving/hibernation is an incompatible device driver, diagnose this by disabling each device in turn (with -deviceDisableWake)
When activating Power Saving across an organisation, it is important to ensure that software updates (security patches and antivirus) are not disrupted.
WSUS can be configured to install updates when workstations are available and Scheduled Tasks can be set to Wake the machine when needed.
Power scheme GUIDs
The use of GUIDs avoids any problems with internationalisation when applying Power Saving to non-english versions of Windows. The three built-in power schemes have the GUIDs listed below:
Power saver (Max power saving)
SET _Max_Power=A1841308-3541-4FAB-BC81-F71556F20B4A
Balanced (Typical)
SET _Med_Power=381B4222-F694-41F0-9685-FF5BB260DF2E
High performance (Min power saving)
SET _Min_Power=8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C
Examples
Powercfg -getactivescheme
Powercfg -devicequery wake_armed
Powercfg -h on
Powercfg -Change -monitor-timeout-ac 20
Powercfg -Change -disk-timeout-ac 30
Powercfg -deviceEnableWake "Microsoft USB IntelliMouse Explorer"
SET _Max_Power=A1841308-3541-4FAB-BC81-F71556F20B4A
Powercfg -SETACTIVE %_Max_Power%
SET _Custom_Power=B1234567-SS64-SS64-SS64-F00000111AAA
Powercfg -DUPLICATESCHEME %_Max_Power%
%_Custom_Power%
Powercfg -CHANGENAME %_Custom_Power% "Custom1"
Powercfg -SETACTIVE %_Custom_Power%
“The fact that you have to choose between nine different ways of turning off your computer... produces just a little bit of unhappiness every time” - Joel on Software
Related:
PowerCfg for
Windows XP SP2
Q915160 - Create a Group Policy object for power schemes
Q324347 - How to use Powercfg.exe in Windows Server 2003
3rd party Power Management tools - EnergyStar.gov