powercfg on:  
[Wikipedia]  
[Google]  
[Amazon]
powercfg (
executable
In computing, executable code, an executable file, or an executable program, sometimes simply referred to as an executable or binary, causes a computer "to perform indicated tasks according to encoded instructions", as opposed to a data fil ...
name
powercfg.exe
) is a
command-line utility
A console application is a computer program designed to be used via a text-only computer interface, such as a text terminal, the command-line interface of some operating systems (Unix, DOS, etc.) or the text-based interface included with most g ...
that is used from an elevated
Windows Command Prompt
Command Prompt, also known as cmd.exe or cmd, is the default command-line interpreter for the OS/2, eComStation, ArcaOS, Microsoft Windows ( Windows NT family and Windows CE family), and ReactOS operating systems. On Windows CE .NET 4.2, ...
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
Microsoft Corporation is an American multinational corporation, multinational technology company, technology corporation producing Software, computer software, consumer electronics, personal computers, and related services headquartered at th ...
in
Windows XP SP2
Windows XP is a major release of Microsoft's Windows NT operating system. It was released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Windows 2000 for high-end and ...
in 2004.
Usage
powercfg must be run from an elevated command prompt, and, under Windows XP, it requires workstation
Administrator or
power user
A power user is a user of computers, software and other electronic devices, who uses advanced features of computer hardware, operating systems, programs, or websites which are not used by the average user. A power user might not have extensive tec ...
rights. Power Schemes are configured on a per-user basis. The most common cause of problems with
power saving
Energy conservation is the effort to reduce wasteful energy consumption by using fewer energy services. This can be done by using energy more effectively (using less energy for continuous service) or changing one's behavior to use less service (f ...
and
hibernation on Windows systems is an incompatible
device driver
In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabling operating systems and o ...
. This can be diagnosed by disabling each device in turn (with
powercfg /devicedisablewake
). When activating power saving across a
local area network
A local area network (LAN) is a computer network that interconnects computers within a limited area such as a residence, school, laboratory, university campus or office building. By contrast, a wide area network (WAN) not only covers a larger ...
, it is important to ensure that software updates, security patches and antivirus updates in particular, are not disrupted. Microsoft recommends that its
Windows Server Update Services
Windows Server Update Services (WSUS), previously known as Software Update Services (SUS), is a computer program and network service developed by Microsoft Corporation that enables administrators to manage the distribution of updates and hot ...
be configured to install updates when workstations are available and
Windows Task Scheduler
Task Scheduler (formerly Scheduled Tasks) is a job scheduler in Microsoft Windows that launches computer programs or scripts at pre-defined times or after specified time intervals. Microsoft introduced this component in the Microsoft Plus! for W ...
can be set to wake the machine when needed.
Syntax
;XP
:
POWERCFG /QUERY "> /CREATE name , /DELETE name , /SETACTIVE name , /CHANGE name settings , /HIBERNATE , /NUMERICAL int , /EXPORT name "> /IMPORT name "> /GLOBALPOWERFLAG /OPTION flag , /BATTERYALARM "> /DEVICEQUERY flagquery , /DEVICEENABLEWAKE devicename , /DEVICEDISABLEWAKE devicename , /?/nowiki>
;Vista, 7
:
powercfg l[ist [/q[uery">st.html" ;"title="l[ist">l[ist [/q[uery[Scheme_GUID">st">l[ist<_a>_[_q[uery.html" ;"title="st.html" ;"title="l[ist">l[ist [/q[uery">st.html" ;"title="l[ist">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
Off or OFF may refer to:
Art and entertainment
*Off (video game), ''Off'' (video game), a video game by Mortis Ghost.
*Sven Väth, German DJ and singer who uses the pseudonym OFF
*Off (album), ''Off'' (album), by Ciwan Haco, 2006
*Off! (album), ' ...
[/a[vailablesleepstates [/devicequery query_flags] [/deviceenablewake devicename] [/devicedisablewake devicename] [/import filename [GUID [/export filename [GUID [/lastwake] [/aliases] [/setsecuritydescriptor [GUID, Action] SDDL]
Action.html" ;"title="getsecuritydescriptor [GUID, Action">getsecuritydescriptor Action [/requestsoverride Caller_type Name Request[/energy [/output filename">requests[/requestsoverride Caller_type Name Request[/energy [/output filename[/xml] [/duration seconds] [/trace [/d filepath [/waketimers] [/?]
Parameters
;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 aliases listed below, which can be used instead of the GUIDs:
*
SCHEME_MAX
= Power saver (Max power saving)
*
SCHEME_BALANCED
= Balanced (Typical)
*
SCHEME_MIN
= High performance (Min power saving)
The other GUIDs have aliases as well.
Examples
Lists all power schemes
powercfg /l
List all Aliases
powercfg -aliases
Retrieve the currently active power scheme
powercfg -getactivescheme
Set the Monitor and disc timeouts for the current Power saver scheme
powercfg -Change -monitor-timeout-ac 20
powercfg -Change -disk-timeout-ac 30
Enable the mouse to wake from sleep
powercfg -deviceEnableWake "Microsoft USB IntelliMouse Explorer"
Set the 'Power saver' scheme
powercfg -SETACTIVE SCHEME_MAX
Create a Custom Power scheme and set it as active
Set _Custom_Power=B1234567-SS64-SS64-SS64-F00000111AAA
powercfg -DUPLICATESCHEME SCHEME_MAX %_Custom_Power%
powercfg -CHANGENAME %_Custom_Power% "SS64 Power Scheme "
powercfg -SETACTIVE %_Custom_Power%
Disable the sleep button (for the users current power scheme)
For /f "tokens=2 delims=:(" %%G in ('powercfg -getActiveScheme') do (
powercfg -setAcValueIndex %%G sub_buttons sButtonAction 0
powercfg -setActive %%G
)
Disable the sleep button (for all available power schemes)
For /f "skip=2 tokens=2,4 delims=:()" %%G in ('powercfg -list') do (
powercfg -setAcValueIndex %%G sub_buttons sButtonAction 0
if "%%H" " *" powercfg -setActive %%G
)
See also
*
List of Control Panel applets (Windows)#Standard applets
References
Further reading
*
External links
*
*
{{Windows commands