Search notes:

powercfg.exe

This Power Settings Command-Line Tool allows to control power settings of the local system from the command line.

Available commands

/LIST, /L Lists all power schemes.
/QUERY, /Q Displays the contents of a power scheme.
/CHANGE, /X Modifies a setting value in the current power scheme.
/CHANGENAME Modifies the name and description of a power scheme.
/DUPLICATESCHEME Duplicates a power scheme.
/DELETE, /D Deletes a power scheme.
/DELETESETTING Deletes a power setting.
/SETACTIVE, /S Makes a power scheme active on the system.
/GETACTIVESCHEME Retrieves the currently active power scheme.
/SETACVALUEINDEX Sets the value associated with a power setting while the system is powered by AC power.
/SETDCVALUEINDEX Sets the value associated with a power setting while the system is powered by DC power.
/IMPORT Imports all power settings from a file.
/EXPORT Exports a power scheme to a file.
/ALIASES Displays all aliases and their corresponding GUIDs.
/GETSECURITYDESCRIPTOR Gets a security descriptor associated with a specified power setting, power scheme, or action.
/SETSECURITYDESCRIPTOR Sets a security descriptor associated with a power setting, power scheme, or action.
/HIBERNATE, /H Enables and disables the hibernate feature. See also C:\hiberfil.sys
/AVAILABLESLEEPSTATES, /A Reports the sleep states available on the system.
/DEVICEQUERY Returns a list of devices that meet specified criteria.
/DEVICEENABLEWAKE Enables a device to wake the system from a sleep state.
/DEVICEDISABLEWAKE Disables a device from waking the system from a sleep state.
/LASTWAKE Reports information about what woke the system from the last sleep transition.
/WAKETIMERS Enumerates active wake timers.
/REQUESTS Enumerates application and driver Power Requests.
/REQUESTSOVERRIDE Sets a Power Request override for a particular Process, Service, or Driver.
/ENERGY Analyzes the system for common energy-efficiency and battery life problems.
/BATTERYREPORT Generates a report of battery usage.
/SLEEPSTUDY Generates a diagnostic system power transition report.
/SRUMUTIL Dumps Energy Estimation data from System Resource Usage Monitor (SRUM).
/SYSTEMSLEEPDIAGNOSTICS Generates a diagnostic report of system sleep transitions.
/SYSTEMPOWERREPORT Generates a diagnostic system power transition report.
/POWERTHROTTLING Control power throttling for an application.

Show available power schemes

powercfg /L (or /LIST or /l) shows the available power schemes:
c:\> powercfg /l
Existing Power Schemes (* Active)
-----------------------------------
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e  (Balanced) *
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c  (High performance)
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a  (Power saver)

Activating a specific power scheme

With a GUID that was found with the previous command, the active power scheme can be changed with the /s (or /setactive) option:
C:\> powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

Don't put the computer to sleep when plugged in

c:\> powercfg /change standby-timeout-ac 0

Change a setting

powercfg.exe -change   -monitor-timeout-ac      <value>
powercfg.exe -change   -monitor-timeout-dc      <value>    

powercfg.exe -change   -disk-timeout-ac         <value>
powercfg.exe -change   -disk-timeout-dc         <value>

powercfg.exe -change   -standby-timeout-ac      <value>
powercfg.exe -change   -standby-timeout-dc      <value>

powercfg.exe -change   -hibernate-timeout-ac    <value>
powercfg.exe -change   -hibernate-timeout-dc    <value>
<value> is a number that indicates the idle time in minutes until the specified device

See also

Power options control panel: powercpl.dll, powercfg.cpl.
C:\> control /name Microsoft.PowerOptions /page pageCreateNewPlan
C:\> control /name Microsoft.PowerOptions /page pagePlanSettings
C:\> control /name Microsoft.PowerOptions /page pageGlobalSettings

Index