Included with Windows XP SP2Windows VistaWindows Server 2008Windows 7Windows 8Windows 8.1Windows Server 2012Windows 10 |
PowerCFG (executable name powercfg.exe
) is a command-line utility that is used from an elevated Windows Command Prompt to control all configurable power system settings, including hardware-specific configurations that are not configurable through the Control Panel, on a per-user basis. It was first introduced by Microsoft in Windows XP SP2 in 2003.
Contents
Usage
Powercfg must be run from an elevated command prompt, and, under Windows XP, it requires workstation Administrator or power user rights. Power Schemes are configured on a per-user basis. The most common cause of problems with power saving and hibernation on Windows systems is an incompatible device driver. This can be diagnosed by disabling each device in turn (with powercfg /devicedisablewake
). When activating power saving across a local area network, it is important to ensure that software updates, security patches and antivirus updates in particular, are not disrupted. Microsoft recommends to configure its Windows Server Update Services to install updates when workstations are available and Windows Task Scheduler can be set to wake the machine when needed.
Syntax
POWERCFG [/LIST | /QUERY [name] | /CREATE name | /DELETE name | /SETACTIVE name | /CHANGE name settings | /HIBERNATE {ON|OFF} | /NUMERICAL int | /EXPORT name [/FILE filename] | /IMPORT name [/FILE filename] | /GLOBALPOWERFLAG {ON|OFF} /OPTION flag | /BATTERYALARM {LOW|CRITICAL} [settings] | /DEVICEQUERY flagquery | /DEVICEENABLEWAKE devicename | /DEVICEDISABLEWAKE devicename | /?]
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
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:
SCHEME_MAX
= Power saver (Max power saving)SCHEME_BALANCED
= Balanced (Typical)SCHEME_MIN
= High performance (Min power saving)Examples
Lists all power schemes
powercfg /lList all Aliases
powercfg -aliasesRetrieve the currently active power scheme
powercfg -getactiveschemeSet the Monitor and disc timeouts for the current Power saver scheme
powercfg -Change -monitor-timeout-ac 20powercfg -Change -disk-timeout-ac 30Enable the mouse to wake from sleep
powercfg -deviceEnableWake "Microsoft USB IntelliMouse Explorer"Set the 'Power saver' scheme
powercfg -SETACTIVE SCHEME_MAXCreate a Custom Power scheme and set it as active
Disable the sleep button (for the users current power scheme)
Disable the sleep button (for all available power schemes)