Powercfg command

Updated: 04/09/2024 by Computer Hope
powercfg command

The powercfg command allows users to view and modify their Windows computer's power plans and settings. Using powercfg provides similar control over the power settings as does the Windows Power Options utility.

Availability

Powercfg is an external command available for the following Microsoft operating systems as powercfg.exe.

Powercfg syntax

Windows 10 and Windows 11 syntax

POWERCFG /COMMAND [ARGUMENTS]

Options:

/aliases Displays all aliases and their corresponding GUIDs. A power scheme alias can be used in place of the scheme_GUID in other options.
/availablesleepstates, /a Reports the sleep available on the system.
/batteryreport Generates a report of battery usage.
/change, /x Modifies a setting value in the current power scheme.
/changename Modifies the name and description of a power scheme.
/delete, /d Deletes a power scheme.
/deletesetting Deletes a power setting.
/devicedisablewake Disables a device from waking the system from a sleep state.
/deviceenablewake Enables a device to wake the system from a sleep state.
/devicequery Returns a list of devices that meet specified criteria.
/duplicatescheme Duplicates a power scheme.
/energy Analyzes the system for common energy-efficient and battery life problems.
/export Exports a power scheme to a file.
/getactivescheme Retrieves the currently active power scheme.
/getsecuritydescriptor Gets a security descriptor associated with a specified power setting, power scheme, or action.
/hibernate, /h Enables or disables the hibernate feature.
/import Imports all power settings from a file.
/lastwake Reports information about what woke the system from the last sleep transition.
/list, /l Lists all power schemes.
/query, /q Displays the contents of a power scheme.
/powerthrottling Control power throttling for an application.
/requests Enumerates application and driver power requests.
/requestsoverride Sets a power request override for a particular process, service, or driver.
/setactive, /s Makes a power scheme active on the system.
/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 AC power.
/setsecuritydescriptor Sets a security descriptor associated with a power setting, power scheme, or action.
/sleepstudy Generates a diagnostic system power transition report.
/srumutil Dumps Energy Estimation data from SRUM (System Resource Usage Monitor).
/systemsleepdiagnostics Generates a diagnostic report of system sleep transitions.
/systempowerreport Generates a diagnostic system power transition report.
/waketimers Enumerates active wake timers.
/? Displays all options for powercfg command.

Windows Vista, 7, and 8 syntax

powercfg [/a] [/aliases]
  [/changename scheme_GUID scheme_name scheme_description]
  [/d scheme_GUID] [/deletesetting sub_GUID setting_GUID]
  [/devicedisablewake device_name] [/deviceenablewake device_name]
  [/devicequery query_flag] [/duplicatescheme scheme_GUID destinationGUID]
  [/energy [/output filename] [/xml] [/duration sec] [/trace] [/d filepath]]
  [/export filename scheme_GUID] [/getactivescheme] 
  [/getsecuritydescriptor GUID|Action] [/h on|off] 
  [/import filename scheme_GUID] [/l] [/lastwake] [/q scheme_GUID sub_GUID] 
  [/requests] [/requestsoverride caller_type caller_name request] 
  [/s scheme_GUID] 
  [/setacvalueindex scheme_GUID sub_GUID setting_GUID setting_index] 
  [/setdcvalueindex scheme_GUID sub_GUID setting_GUID setting_index] 
  [/setsecuritydescriptor GUID|action SDDL] [/waketimers] 
  [/x scheme_setting setting_value] [/?]

Options:

/a Displays available sleep states.
/aliases Displays all power scheme aliases and each of their GUIDs. A power scheme alias can be used in place of the scheme_GUID in other options.
/changename scheme_GUID scheme_name scheme_description Changes the name and description of the specified power scheme.
scheme_description is optional, and if omitted, only the scheme name is changed.
/d scheme_GUID Deletes the scheme_GUID power scheme. Use powercfg /l to obtain the scheme_GUID.
/deletesetting sub_GUID setting_GUID Delete the setting_GUID power setting for the sub_GUID subgroup.
/devicedisablewake device_name Prevents the device_name device from waking the computer from its sleep state.
Use powercfg /devicequery wake_armed to obtain the device_name.
/deviceenablewake device_name Allows the device_name device to wake the computer from its sleep state.
Use powercfg /devicequery wake_programmable to obtain the device_name.
/devicequery query_flag Displays devices that meet the query_flag.
Available query flags are:
all_devices
all_devices_verbose
S1_supported
S2_supported
S3_supported
S4_supported
wake_armed
wake_from_any
wake_from_S1_supported
wake_from_S2_supported
wake_from_S3_supported
wake_programmable
/duplicatescheme scheme_GUID destinationGUID Copies the scheme_GUID power scheme to the destinationGUID power scheme.
destinationGUID is optional, and if omitted, a new power scheme GUID is created.
Use powercfg /l to obtain the scheme_GUID.
/energy [/output filename] [/xml] [/duration seconds] [/trace] [/d filepath] Identifies common battery life and energy-efficiency problems on the computer. Only available in Windows 7 and specific Windows 10 Insider builds.
/output filename - specifies the name and path of the generated HTML report file.
/xml - generates the report as an XML file.
/duration seconds - sets the time, in seconds, to record and analyze the computer system's behavior.
/trace - causes the process to only record the computer system's behavior, preventing analysis of that behavior.
/d filepath - specifies where to save the trace details.
/export filename scheme_GUID Exports the scheme_GUID power scheme and saves it to the filename file.
Use powercfg /l to obtain the scheme_GUID.
/getactivescheme Displays the currently active power scheme.
/getsecuritydescriptor action|GUID Displays the security descriptor assigned to the GUID power scheme, GUID power setting, or action.
Available action values are ActionCreate, ActionDefault, ActionSetActive.
Use powercfg /getsecuritydescriptor to view SDDL strings.
/h on|off Enable or disable hibernate mode on the computer.
/import filename scheme_GUID Import all power settings from the filename file to the scheme_GUID power scheme.
scheme_GUID is optional, and if omitted, a new power scheme is created.
The filename file is created using the /export option.
Use powercfg /l to obtain the scheme_GUID.
/lastwake Displays details about the event that caused the computer to wake from its sleep state.
/q scheme_GUID sub_GUID Displays contents of the scheme_GUID power scheme.
scheme_GUID and sub_GUID are optional, and if omitted, contents of the currently active power scheme are displayed.
Use powercfg /l to obtain the scheme_GUID.
Use powercfg /q to obtain the sub_GUID.
/requests Displays power requests for applications and drivers.
/requestsoverride caller_type caller_name request Sets the request power request override for caller_name and caller_type.
Available request values are Awaymode, Display, System.
Use powercfg /requests to obtain caller_name and caller_type.
/s scheme_GUID Set the scheme_GUID power scheme to be active.
Use powercfg /l to obtain the scheme_GUID.
/setacvalueindex scheme_GUID sub_GUID setting_GUID setting_index Sets the setting_index value for the scheme_GUID power scheme and sub_GUID setting_GUID power setting when the computer uses AC power.
Use powercfg /l to obtain the scheme_GUID.
Use powercfg /q to obtain the sub_GUID and setting_GUID.
/setdcvalueindex scheme_GUID sub_GUID setting_GUID setting_index Sets the setting_index value for the scheme_GUID power scheme and sub_GUID setting_GUID power setting when the computer uses DC power.
Use powercfg /l to obtain the scheme_GUID.
Use powercfg /q to obtain the sub_GUID and setting_GUID.
/setsecuritydescriptor action|GUID SDDL Set the SDDL security descriptor for the GUID power scheme, GUID power setting, or action.
Available action values are ActionCreate, ActionDefault, ActionSetActive.
Use powercfg /getsecuritydescriptor to view SDDL strings.
/waketimers Displays the active wake timers.
/x scheme_setting setting_value For the currently active power scheme, change scheme_setting to setting_value.
Settings available to change are:
processor-throttle-ac throttle
processor-throttle-dc throttle
disk-timeout-ac minutes
disk-timeout-dc minutes
hibernate-timeout-ac minutes
hibernate-timeout-dc minutes
monitor-timeout-ac minutes
monitor-timeout-dc minutes
standby-timeout-ac minutes
standby-timeout-dc minutes

Available values for throttle are ADAPTIVE, CONSTANT, DEGRADE, NONE.
Setting minutes to 0 means never timeout.
/? Displays all options for powercfg command.

Windows XP syntax

powercfg [/a] [/b low|critical settings] 
  [/change scheme_settings setting_value] [/c scheme_name] 
  [/d scheme_name] [/devicedisablewake device_name] 
  [/deviceenablewake device_name] 
  [/devicequery flagquery} [/export scheme_name [/file filename]] 
  [/g on|off] [/h on|off] [/import scheme_name [/file filename]] 
  [/l] [/n integer] [/option flag] [/q scheme_name] [/s scheme_name] [/?]

Options:

/a Displays available sleep states.
/b low|critical settings Configure the settings setting for the low|critical battery alarm.
Available settings are:
/action hibernate|shutdown|standby|none - The action to take when the battery alarm is activated.
/activate on|off - Turn battery alarm on or off.
/forceaction on|off - Force the standby or shutdown of the computer, even if a program is not responding.
/level percentage (0-100) - Trigger the battery alarm when battery power level reaches percentage.
/program on|off - Specify a program to run when the battery alarm is activated. Can use schtasks.exe /change command to configure the program.
/sound on|off - Turns the battery alarm sound on or off.
/text on|off - Turns the battery alarm notification text on or off.
/c scheme_name Creates a new power scheme, named scheme_name.
/change scheme_setting setting_value For the currently active power scheme, change scheme_setting to setting_value.
Settings available to change are:
processor-throttle-ac throttle
processor-throttle-dc throttle
disk-timeout-ac minutes
disk-timeout-dc minutes
hibernate-timeout-ac minutes
hibernate-timeout-dc minutes
monitor-timeout-ac minutes
monitor-timeout-dc minutes
standby-timeout-ac minutes
standby-timeout-dc minutes

Available values for throttle are ADAPTIVE, CONSTANT, DEGRADE, NONE.
Setting minutes to 0 means never timeout.
/d scheme_name Deletes the scheme_name power scheme.
Use powercfg /l to obtain the scheme_name.
/devicedisablewake device_name Prevents the device_name device from waking the computer from its sleep state.
Use powercfg /devicequery wake_armed to obtain the device_name.
/deviceenablewake device_name Allows the device_name device to wake the computer from its sleep state.
Use powercfg /devicequery wake_programmable to obtain the device_name.
/devicequery query_flag Displays devices that meet the query_flag.
Available flags are:
all_devices
all_devices_verbose
S1_supported
S2_supported
S3_supported
S4_supported
wake_armed
wake_from_any
wake_from_S1_supported
wake_from_S2_supported
wake_from_S3_supported
wake_programmable
/export scheme_name [/file filename] Exports the scheme_name power scheme and saves it to the filename file.
Use powercfg /l to obtain the scheme_name.
/g on|off Turn a global power flag on or off.
The available global power flags are:
BatteryIcon - Display or hide the battery meter icon in the system tray.
MultiBattery - Turns the multiple battery display on or off in the system Power Meter.
ResumePassword - Enable or disable password prompt when resuming the computer from a sleep state.
VideoDim - Enable or disable support for dimming the computer display when running on battery power.
WakeOnRing - Enable or disable wake-on ring support.
/h on|off Enable or disable hibernate mode on the computer.
/import scheme_name [/file filename] Import all power settings from the filename file to the scheme_name power scheme.
scheme_name is optional, and if omitted, a new power scheme is created.
The filename file is created using the /export option.
Use powercfg /l to obtain the scheme_name.
/l Displays all power schemes for the current user's account.
/n A switch allowing a number to be used to specify a power scheme, in place of a scheme_name, for the /change, /d, /export, /import, /q, /s options.
/q scheme_name Displays contents of the scheme_name power scheme.
Use powercfg /l to obtain the scheme_name.
/s scheme_name Set the scheme_name power scheme to be active.
Use powercfg /l to obtain the scheme_name.
/? Displays all options for powercfg command.

Powercfg examples

See the current sleep states (power settings) available on the computer, including if the computer supports InstantGo.

powercfg /a

Display a list of all power schemes on the computer.

powercfg /l

Display all settings for the power scheme with GUID of 381b4222-f694-41f0-9685-ff5bb260df2e.

powercfg /q 381b4222-f694-41f0-9685-ff5bb260df2e

Change the timeout value to 10 minutes for the monitor-timeout-ac setting of the currently active power scheme.

powercfg /x monitor-timeout-ac 10

Enable hibernate mode on the computer.

powercfg /h on

Set the power scheme with GUID of 381b4222-f694-41f0-9685-ff5bb260df2e to be the active power scheme.

powercfg /s 381b4222-f694-41f0-9685-ff5bb260df2e

Delete the power scheme with GUID of 381b4222-f694-41f0-9685-ff5bb260df2e.

powercfg /d 381b4222-f694-41f0-9685-ff5bb260df2e

If you have a laptop, use the following command to create an HTML (hypertext markup language) report of your main battery. Once create, the file "battery.html" on the C: drive.

Note

In order for this command to run properly you must be running the command line in an elevated mode.

powercfg /batteryreport /output "C:\battery.html"