cheat sheet

powercfg

Manage Windows power plans, enable or disable hibernation, diagnose battery health and sleep failures, and generate energy efficiency reports from the command prompt.

powercfg — Power Configuration CLI

What it is

powercfg is a built-in Windows command that controls the Power Management subsystem: it lets you list, create, activate, and delete power plans; enable or disable hibernation and fast startup; query sleep and wake source history; and generate detailed energy efficiency and battery reports. Use it in deployment scripts to enforce a power policy, in troubleshooting to diagnose why a machine won't sleep or wakes unexpectedly, and in battery health monitoring for laptops. Requires Administrator privileges for most operations.

Availability

powercfg ships as C:\Windows\System32\powercfg.exe on Windows XP and later. Most diagnostic switches require Windows 7+.

cmd
powercfg /?

Output:

less
POWERCFG /OPTION [ARGUMENTS] [/?]

Description:
  Enables users to control the power settings on a local system.
...

Syntax

cmd
powercfg /option [arguments]

Output: (varies by option)

Essential options

SwitchMeaning
/list or /lList all power plans (GUIDs and names)
/getactiveschemeShow the currently active power plan
/setactive <GUID>Activate a power plan by GUID
/duplicatescheme <GUID>Duplicate a plan (creates a copy to customise)
/deletescheme <GUID>Delete a custom power plan
/query [<GUID>]Show all settings for a plan
/change <setting> <value>Change a single setting in the active plan
`/h onoff`
/energyGenerate an energy efficiency HTML report
/batteryreportGenerate an HTML battery health report
/sleepstudyGenerate an HTML sleep diagnostic report
/lastwakeShow the last wake source
/waketimersList active wake timers
/requestsShow what is preventing sleep (process, service, driver)
/requestsoverrideOverride a sleep request
/devicequery wake_armedList devices allowed to wake the machine
/deviceenablewake <device>Allow a device to wake the system
/devicedisablewake <device>Prevent a device from waking the system
/export <file> <GUID>Export a power plan to a .pow file
/import <file>Import a power plan from a .pow file

Listing and activating power plans

Three built-in power plans are available by well-known GUID. Custom plans created via the GUI get dynamically assigned GUIDs.

cmd
powercfg /list

Output:

markdown
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)
cmd
powercfg /getactivescheme

Output:

yaml
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e  (Balanced)
cmd
rem Activate High Performance plan
powercfg /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

Output:

csharp
(none — exits 0 on success)

Changing individual power settings

/change modifies a setting in the currently active plan. Common setting names: monitor-timeout-ac, monitor-timeout-dc, disk-timeout-ac, disk-timeout-dc, standby-timeout-ac, standby-timeout-dc, hibernate-timeout-ac, hibernate-timeout-dc. Values are in minutes; 0 = never.

cmd
rem Disable screen timeout on AC power
powercfg /change monitor-timeout-ac 0

Output:

csharp
(none — exits 0 on success)
cmd
rem Set sleep after 30 minutes on battery
powercfg /change standby-timeout-dc 30

Output:

csharp
(none — exits 0 on success)

Enabling and disabling hibernation

Hibernation saves RAM contents to hiberfil.sys and powers off the machine. Disabling it reclaims disk space equal to installed RAM and also disables Fast Startup.

cmd
rem Disable hibernation (removes hiberfil.sys)
powercfg /h off

Output:

csharp
(none — exits 0 on success)
cmd
rem Re-enable hibernation
powercfg /h on

Output:

csharp
(none — exits 0 on success)

Energy efficiency report (/energy)

/energy runs a 60-second trace of system activity and produces an HTML report listing inefficiencies, errors, and warnings that affect power consumption. The report path is printed at the end.

cmd
powercfg /energy

Output:

kotlin
Enabling tracing for 60 seconds...
Observing system behavior...
Analyzing trace data...
Analysis complete.

Energy efficiency problems were found.

  5 Errors
  7 Warnings
  21 Informational

See C:\Windows\system32\energy-report.html for details.

Battery report (/batteryreport)

/batteryreport generates a detailed HTML report of battery capacity history, charge cycles, and usage patterns — essential for diagnosing degraded laptop batteries.

cmd
powercfg /batteryreport /output C:\Reports\battery.html

Output:

css
Battery life report saved to file path C:\Reports\battery.html.

Sleep study (/sleepstudy)

/sleepstudy produces an HTML report of the machine's sleep session history — how long it slept, power consumed, and what caused it to wake. Available on systems with Modern Standby (S0 Low Power Idle).

cmd
powercfg /sleepstudy /output C:\Reports\sleepstudy.html

Output:

css
Sleep Study report saved to file path C:\Reports\sleepstudy.html.

Diagnosing sleep prevention (/requests and /lastwake)

/requests lists programs, drivers, and services that have posted a power request preventing the system from sleeping. /lastwake shows what triggered the most recent wake.

cmd
powercfg /requests

Output:

vbnet
DISPLAY:
[PROCESS] \Device\HarddiskVolume3\Program Files\MyApp\myapp.exe
Preventing display from sleeping.

SYSTEM:
None.

AWAYMODE:
None.
cmd
powercfg /lastwake

Output:

less
Wake History Count - 1
Wake History [0]
  Wake Source Count - 1
  Wake Source [0]
    Type: Wake Timer
    Owner: [PROCESS] \Device\HarddiskVolume3\Windows\System32\svchost.exe
    Owner Supplied Reason: Windows Update

Common pitfalls

  1. Most operations require elevation — run cmd.exe as Administrator; unprivileged calls return "Access is denied".
  2. /h off also disables Fast Startup — disabling hibernation prevents Fast Startup (hybrid shutdown); if boot time increases after powercfg /h off, this is why.
  3. /energy requires 60 seconds — the trace window cannot be shortened; budget time accordingly in scripts.
  4. GUIDs vary across machines for custom plans — always use powercfg /list to retrieve the GUID dynamically rather than hardcoding it in scripts.
  5. /change affects only the currently active plan — switch to the target plan first with /setactive before calling /change.
  6. /batteryreport is only useful on battery-powered devices — on desktops it produces a report showing "N/A" for most battery fields.

Real-world recipes

Enforce High Performance plan in a deployment script

cmd
@echo off
rem Activate High Performance power plan
powercfg /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
rem Disable all sleep and hibernate timeouts on AC
powercfg /change standby-timeout-ac 0
powercfg /change hibernate-timeout-ac 0
powercfg /h off
echo Power plan configured for server use.

Output:

rust
Power plan configured for server use.

Collect battery health report for a fleet of laptops

cmd
powercfg /batteryreport /output "\\fileserver\reports\battery_%COMPUTERNAME%.html"
echo Battery report saved for %COMPUTERNAME%.

Output:

css
Battery life report saved to file path \\fileserver\reports\battery_MYHOST.html.
Battery report saved for MYHOST.

Find what is preventing sleep

cmd
powercfg /requests
powercfg /waketimers
powercfg /lastwake

Output:

less
DISPLAY:
[PROCESS] \Device\...\myapp.exe
Preventing display from sleeping.

Timer Set By: [PROCESS] \Device\...\svchost.exe
Reason: Windows Update

Wake History [0]
  Wake Source [0]
    Type: Wake Timer
    Owner Supplied Reason: Windows Update

Power plans and the well-known GUIDs

Windows ships with three predefined power plans. Their GUIDs are stable across every Windows release — you can hardcode them in deployment scripts. OEMs and group policy may also define hidden plans (Ultimate Performance, Recommended balanced settings); those plans appear in powercfg /list only after they're surfaced with powercfg -duplicatescheme.

PlanGUIDWhen to pick
Balanced381b4222-f694-41f0-9685-ff5bb260df2eDefault for laptops and most desktops
High performance8c5e7fda-e8bf-4a96-9a85-a6e23a8c635cServers, gaming, latency-sensitive workloads
Power savera1841308-3541-4fab-bc81-f71556f20b4aBattery-only, max runtime
Ultimate Performancee9a42b02-d5df-448d-aa00-03f14749eb61Workstations/servers; hidden by default
cmd
rem Surface the hidden Ultimate Performance plan
powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61

Output:

arduino
Power Scheme GUID: <new-guid>  (Ultimate Performance)

Setting subgroups and individual settings (/setacvalueindex, /setdcvalueindex)

/change covers the common timeouts. For every other setting, powercfg exposes a two-level GUID hierarchy: subgroup (e.g. Hard disk, Sleep, Display) and setting (e.g. Turn off hard disk after, Hibernate after). Setting values uses setacvalueindex (plugged-in / AC) or setdcvalueindex (battery / DC).

cmd
rem List the active plan's subgroups and settings
powercfg /query

Output: (long block — sample)

yaml
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e  (Balanced)
  Subgroup GUID: 0012ee47-9041-4b5d-9b77-535fba8b1442  (Hard disk)
    Power Setting GUID: 6738e2c4-e8a5-4a42-b16a-e040e769756e  (Turn off hard disk after)
      Possible Setting Index: 000
      Possible Setting Friendly Name: Never
      ...
    Current AC Power Setting Index: 0x00000000
    Current DC Power Setting Index: 0x00000258
cmd
rem Aliases — powercfg accepts well-known aliases instead of GUIDs
powercfg /aliases | findstr /I "hibernate sleep monitor"

Output:

vbnet
GUID Alias
381b4222-f694-41f0-9685-ff5bb260df2e  SCHEME_BALANCED
8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c  SCHEME_MIN
a1841308-3541-4fab-bc81-f71556f20b4a  SCHEME_MAX
238c9fa8-0aad-41ed-83f4-97be242c8f20  SUB_SLEEP
29f6c1db-86da-48c5-9fdb-f2b67b1f44da  STANDBYIDLE
9d7815a6-7ee4-497e-8888-515a05f02364  HIBERNATEIDLE
7516b95f-f776-4464-8c53-06167f40cc99  SUB_VIDEO
3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e  VIDEOIDLE
cmd
rem Set max processor state to 80% on AC (limit CPU turbo)
powercfg /setacvalueindex SCHEME_CURRENT SUB_PROCESSOR PROCTHROTTLEMAX 80
powercfg /setactive SCHEME_CURRENT

Output: (none — exits 0 on success)

cmd
rem Set sleep after 5 minutes on battery for the active plan
powercfg /setdcvalueindex SCHEME_CURRENT SUB_SLEEP STANDBYIDLE 300
powercfg /setactive SCHEME_CURRENT

Output: (none — exits 0 on success)

cmd
rem Disable USB selective suspend (often the cause of "USB device not recognized" after sleep)
powercfg /setacvalueindex SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0
powercfg /setactive SCHEME_CURRENT

Output: (none — exits 0 on success)

Always re-apply with /setactive SCHEME_CURRENT after /setacvalueindex or /setdcvalueindex — the new index value isn't picked up by the kernel until the active plan is re-activated.

Sleep states (/availablesleepstates)

powercfg /a reports which sleep states the firmware and OS support. The available states have changed dramatically over time — older platforms support classic S1/S3/S4; modern laptops use Modern Standby (S0 Low Power Idle). If a machine "won't sleep" because no sleep state is available, this is the diagnostic. Starting with Windows 11 24H2 (and confirmed by Microsoft in February 2026), Modern Standby includes a battery-drain protection: when excessive drain is detected, most wake sources are automatically disabled and the device can only be woken by the power button or lid open.

cmd
powercfg /a

Output:

kotlin
The following sleep states are available on this system:
    Standby (S0 Low Power Idle) Network Connected
    Hibernate
    Fast Startup

The following sleep states are not available on this system:
    Standby (S1)
        The system firmware does not support this standby state.
    Standby (S2)
        The system firmware does not support this standby state.
    Standby (S3)
        The system firmware does not support this standby state.
    Hybrid Sleep
        Hibernation is not available.
StatePower drawResume timeNotes
S0 Low Power Idle~few WinstantModern Standby, fully network-aware
S1medium<1sCPU stopped, RAM refreshed — legacy
S3low~1-2sSuspend to RAM — most laptops 2015+
S4 / Hibernatenone10-30sRAM written to hiberfil.sys
Hybrid Sleeplow<2sS3 + S4 combined; desktop default
Fast Startup(boot)<10sKernel hibernates on shutdown

Battery report (/batteryreport) deep dive

powercfg /batteryreport produces an HTML report rich enough to plot battery degradation over time. The same data is also available as XML with /xml. Key sections:

SectionWhat it tells you
Installed batteriesManufacturer, design capacity, full charge capacity
Recent usageLast 3 days of state changes (charging, discharging, idle)
Battery usageTime-series of charge level over the last 3 days
Usage historyDaily aggregate active/connected-standby duration
Battery capacity historyDesign vs full-charge capacity over time — wear curve
Battery life estimatesEstimated runtime at design vs current capacity
cmd
rem Standard HTML report
powercfg /batteryreport /output C:\Reports\battery.html

Output:

text
Battery life report saved to C:\Reports\battery.html.
cmd
rem XML for downstream parsing
powercfg /batteryreport /output C:\Reports\battery.xml /xml

Output:

text
Battery life report saved to C:\Reports\battery.xml.
cmd
rem Two reports a week apart — compare wear
powercfg /batteryreport /output C:\Reports\battery_baseline.html
schtasks /create /tn "BatteryReportWeekly" /sc weekly /d Sun /st 09:00 ^
    /tr "powercfg /batteryreport /output C:\Reports\battery_%%DATE:~-10,2%%-%%DATE:~-7,2%%-%%DATE:~-4,4%%.html"

Output:

text
Battery life report saved to C:\Reports\battery_baseline.html.
SUCCESS: The scheduled task "BatteryReportWeekly" has successfully been created.
powershell
# Calculate battery wear from the XML report
[xml]$br = Get-Content C:\Reports\battery.xml
$design = [int]$br.BatteryReport.Batteries.Battery.DesignCapacity
$full   = [int]$br.BatteryReport.Batteries.Battery.FullChargeCapacity
$wear   = [math]::Round((1 - ($full / $design)) * 100, 1)
"Design : $design mWh"
"Full   : $full mWh"
"Wear   : $wear %"

Output:

yaml
Design : 56000 mWh
Full   : 49200 mWh
Wear   : 12.1 %

Energy efficiency report (/energy) deep dive

/energy runs a 60-second ETW trace and produces an HTML report categorizing findings into Errors, Warnings, and Information. Common findings worth checking:

Finding categoryExample
Power policyDisplay idle timeout high on AC
Platform timer resolutionProcess X has raised the timer resolution (drains battery)
Processor utilizationProcess Y > 5% over the 60-second sample
DevicesUSB device blocking selective suspend
CPU utilizationAverage CPU % is X over the trace
cmd
rem Standard run — 60 seconds
powercfg /energy /output C:\Reports\energy.html

Output:

text
Enabling tracing for 60 seconds...
Observing system behavior...
Analyzing trace data...
Analysis complete.

Energy efficiency problems were found.

3 Errors
12 Warnings
17 Informational

See C:\Reports\energy.html for more details.
cmd
rem Longer trace (5 minutes) for intermittent issues
powercfg /energy /output C:\Reports\energy.html /duration 300

Output:

text
Enabling tracing for 300 seconds...
Observing system behavior...
Analyzing trace data...
Analysis complete.

See C:\Reports\energy.html for more details.
cmd
rem XML for parsing
powercfg /energy /output C:\Reports\energy.xml /xml

Output:

text
Enabling tracing for 60 seconds...
Observing system behavior...
Analyzing trace data...
Analysis complete.

See C:\Reports\energy.xml for more details.
cmd
rem Look at just the errors
powercfg /energy /output C:\Reports\energy.html
powershell -NoProfile -Command "Select-String -Path C:\Reports\energy.html -Pattern '<td class=\"errorname\"\">'"

Output:

text
Energy efficiency problems were found.

C:\Reports\energy.html:482:    <td class="errorname">USB Suspend:USB Device not Entering Suspend</td>
C:\Reports\energy.html:511:    <td class="errorname">Platform Timer Resolution:Outstanding Timer Request</td>

Sleep study (/sleepstudy)

/sleepstudy aggregates Modern Standby session data: how long each S0 session lasted, what fraction was in Active, Drips (low-power), or Resiliency (recovery from a faulty driver), and what drained the battery. Available on Modern Standby machines only — desktops will fail with Sleep Study requires Connected Standby support.

cmd
rem Standard report (last 3 days)
powercfg /sleepstudy /output C:\Reports\sleepstudy.html

Output:

text
Sleep Study report saved to C:\Reports\sleepstudy.html.
cmd
rem Custom window (last 28 days)
powercfg /sleepstudy /output C:\Reports\sleep28.html /duration 28

Output:

text
Sleep Study report saved to C:\Reports\sleep28.html.
cmd
rem Drill down on a specific battery drain offender from the report
powercfg /srumutil /output C:\Reports\srum.csv /csv

Output: (CSV of SRUM — System Resource Usage Monitor — energy attribution rows)

System Power Report (/systempowerreport)

/systempowerreport (alias /spr) generates an HTML report combining sleep diagnostics for Modern Standby and non-Modern-Standby systems. It's the successor to /sleepstudy on Windows 10/11 desktops.

cmd
powercfg /systempowerreport /output C:\Reports\sysenergy.html

Output:

text
System Power Report saved to C:\Reports\sysenergy.html.

Devices that wake the system

/devicequery is the inventory command for device wake-arming. Wake-on-LAN, mice/keyboards waking from sleep, and unexpected wake events all flow through this list.

cmd
rem Devices currently allowed to wake the machine
powercfg /devicequery wake_armed

Output:

arduino
HID Keyboard Device
HID-compliant mouse
Realtek PCIe GbE Family Controller
cmd
rem Devices that support wake
powercfg /devicequery wake_from_S3

Output:

text
HID Keyboard Device
HID-compliant mouse
Realtek PCIe GbE Family Controller
Intel(R) Wireless-AC 9560 160MHz
cmd
rem Allow / disallow wake for one device (exact name from /devicequery)
powercfg /deviceenablewake "HID Keyboard Device"
powercfg /devicedisablewake "Realtek PCIe GbE Family Controller"

Output: (none — exits 0 on success)

cmd
rem Find the device that woke the machine last
powercfg /lastwake

Output:

less
Wake History Count - 1
Wake History [0]
  Wake Source Count - 1
  Wake Source [0]
    Type: Device
    Instance Path: HID\VID_046D&PID_C52B&...
    Friendly Name: HID Keyboard Device
    Description: HID Keyboard Device
    Manufacturer: (Standard keyboards)

Wake timers

Wake timers are scheduled tasks or applications that ask the kernel to wake the machine. They're a common cause of "the laptop turned itself on overnight". /waketimers lists active timers; the Allow wake timers power-setting controls whether they fire at all.

cmd
powercfg /waketimers

Output:

vbnet
Timer set by [PROCESS] \Device\HarddiskVolume3\Windows\System32\svchost.exe (SystemEventsBroker) expires at 5/25/2026 03:00:00.
  Reason: Windows will execute 'NT TASK\Microsoft\Windows\UpdateOrchestrator\Reboot' scheduled task that requested waking the computer.
cmd
rem Disable wake timers entirely on battery
powercfg /setdcvalueindex SCHEME_CURRENT SUB_SLEEP RTCWAKE 0
powercfg /setactive SCHEME_CURRENT

Output: (none — exits 0 on success)

/requests — what's preventing sleep right now

/requests lists every outstanding power request from a process, driver, or service. The classic culprits are media players (DISPLAY request), background sync apps, and printer drivers.

cmd
powercfg /requests

Output:

vbnet
DISPLAY:
[PROCESS] \Device\HarddiskVolume3\Program Files\MyApp\myapp.exe
Preventing display from sleeping.

SYSTEM:
[DRIVER] \FileSystem\srvnet
An active remote client has recently sent requests to this machine.

AWAYMODE:
None.

EXECUTION:
None.

PERFBOOST:
None.

ACTIVELOCKSCREEN:
None.
cmd
rem Override a request from a misbehaving process — clears it once
powercfg /requestsoverride PROCESS myapp.exe DISPLAY

Output: (none — exits 0 on success)

cmd
rem List active overrides
powercfg /requestsoverride

Output:

text
PROCESS
------
myapp.exe                                                                                              DISPLAY
cmd
rem Remove an override
powercfg /requestsoverride PROCESS myapp.exe

Output: (none — exits 0 on success)

Exporting and importing power plans

Plans are stored in the registry but /export and /import use a portable .pow binary format that round-trips between machines. Use this to push a hardened power configuration to a fleet without group policy.

cmd
rem Export the active plan
for /f "tokens=4" %%g in ('powercfg /getactivescheme') do set ACTIVE=%%g
powercfg /export C:\Config\active.pow %ACTIVE%

Output: (none — exits 0 on success)

cmd
rem Import on the target — gets a new GUID
powercfg /import C:\Config\active.pow
powercfg /list

Output:

markdown
Existing Power Schemes (* Active)
-----------------------------------
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e  (Balanced) *
Power Scheme GUID: <new-guid>  (Balanced)
cmd
rem Activate the imported plan by GUID
powercfg /setactive <new-guid>

Output: (none — exits 0 on success)

PowerShell equivalents

Get-PowerScheme and friends from the PowerManagement module wrap powercfg, returning structured objects.

powershell
# List plans (PowerShell objects, not text)
Get-CimInstance -Namespace root\cimv2\power -ClassName Win32_PowerPlan |
    Select-Object ElementName, InstanceID, IsActive

Output:

sql
ElementName       InstanceID                                                                IsActive
-----------       ----------                                                                --------
Balanced          Microsoft:PowerPlan\{381b4222-f694-41f0-9685-ff5bb260df2e}                True
High performance  Microsoft:PowerPlan\{8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c}                False
Power saver       Microsoft:PowerPlan\{a1841308-3541-4fab-bc81-f71556f20b4a}                False
powershell
# Switch via WMI
$hp = Get-CimInstance -Namespace root\cimv2\power -ClassName Win32_PowerPlan |
    Where-Object ElementName -eq 'High performance'
Invoke-CimMethod -InputObject $hp -MethodName Activate
powershell
# Current battery level
(Get-CimInstance -Namespace root\WMI -ClassName BatteryStatus -ErrorAction SilentlyContinue).RemainingCapacity
powershell
# Battery design vs full capacity via WMI (alternative to /batteryreport)
$design = (Get-CimInstance -Namespace root\WMI -ClassName BatteryStaticData).DesignedCapacity
$full   = (Get-CimInstance -Namespace root\WMI -ClassName BatteryFullChargedCapacity).FullChargedCapacity
'Wear: {0:N1}%' -f ((1 - $full/$design) * 100)

Output: Wear: 12.1%

powershell
# Watching wake events via the kernel-power channel
Get-WinEvent -FilterHashtable @{
    LogName      = 'System'
    ProviderName = 'Microsoft-Windows-Kernel-Power'
    Id           = 107, 42, 1
} -MaxEvents 20 |
    Select-Object TimeCreated, Id,
                  @{ N='Action'; E={
                      switch ($_.Id) {
                          1   { 'Sleep' }
                          42  { 'Sleep'  }
                          107 { 'Resume' }
                      }
                  }}

Output:

swift
TimeCreated         Id Action
-----------         -- ------
5/25/2026 06:30:00 107 Resume
5/25/2026 02:14:11  42 Sleep
5/24/2026 23:14:00 107 Resume
5/24/2026 18:00:00  42 Sleep

Common pitfalls

  1. Most operations require elevation — run cmd.exe as Administrator; unprivileged calls return "Access is denied".
  2. /h off also disables Fast Startup — disabling hibernation prevents Fast Startup (hybrid shutdown); if boot time increases after powercfg /h off, this is why.
  3. /energy requires 60 seconds — the trace window cannot be shortened; budget time accordingly in scripts.
  4. GUIDs vary across machines for custom plans — always use powercfg /list to retrieve the GUID dynamically rather than hardcoding it in scripts.
  5. /change affects only the currently active plan — switch to the target plan first with /setactive before calling /change.
  6. /batteryreport is only useful on battery-powered devices — on desktops it produces a report showing "N/A" for most battery fields.
  7. setacvalueindex / setdcvalueindex don't take effect until /setactive — silent gotcha; new value is staged but not activated.
  8. /sleepstudy requires Modern Standby — on desktops or older laptops use /systempowerreport instead.
  9. Wake timer scheduled tasks override the power policy — even with "Allow wake timers" disabled, a task with RunOnlyIfNetworkAvailable=false and WakeToRun=true can still wake the system. Audit with schtasks /query /v /fo csv | findstr "Wake To Run".
  10. /requests shows zero while the user is at the console — request enumeration filters out interactive-session DISPLAY requests by default. Run with psexec -s -i powercfg /requests from a SYSTEM context to see them all.
  11. Group Policy can override /setactive — domain-deployed plans (Computer Configuration → Policies → Administrative Templates → System → Power Management) override the local active scheme on each policy refresh. Audit with gpresult /h C:\gp.html.
  12. hiberfil.sys can balloon to 75% of RAM — Windows allocates the file at hibernation file size = HiberFileSizePercent of RAM (default 75%). Shrink with powercfg /h /type reduced if disk-constrained.

Real-world recipes

Enforce High Performance plan in a deployment script

cmd
@echo off
rem Activate High Performance power plan
powercfg /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
rem Disable all sleep and hibernate timeouts on AC
powercfg /change standby-timeout-ac 0
powercfg /change hibernate-timeout-ac 0
powercfg /h off
echo Power plan configured for server use.

Output:

rust
Power plan configured for server use.

Collect battery health report for a fleet of laptops

cmd
powercfg /batteryreport /output "\\fileserver\reports\battery_%COMPUTERNAME%.html"
echo Battery report saved for %COMPUTERNAME%.

Output:

css
Battery life report saved to file path \\fileserver\reports\battery_MYHOST.html.
Battery report saved for MYHOST.

Find what is preventing sleep

cmd
powercfg /requests
powercfg /waketimers
powercfg /lastwake

Output:

less
DISPLAY:
[PROCESS] \Device\...\myapp.exe
Preventing display from sleeping.

Timer Set By: [PROCESS] \Device\...\svchost.exe
Reason: Windows Update

Wake History [0]
  Wake Source [0]
    Type: Wake Timer
    Owner Supplied Reason: Windows Update

Audit battery wear across a laptop fleet

powershell
$hosts = Get-Content C:\Audit\laptops.txt
$report = foreach ($h in $hosts) {
    Invoke-Command -ComputerName $h -ScriptBlock {
        $xml = "$env:TEMP\battery_$env:COMPUTERNAME.xml"
        powercfg /batteryreport /output $xml /xml | Out-Null
        [xml]$br = Get-Content $xml
        $bat = $br.BatteryReport.Batteries.Battery
        if ($bat) {
            [PSCustomObject]@{
                Host    = $env:COMPUTERNAME
                Serial  = $bat.SerialNumber
                Design  = [int]$bat.DesignCapacity
                Full    = [int]$bat.FullChargeCapacity
                WearPct = [math]::Round((1 - ([int]$bat.FullChargeCapacity)/([int]$bat.DesignCapacity))*100,1)
            }
        }
    }
}
$report | Sort-Object WearPct -Descending | Format-Table -AutoSize

Output:

sql
Host   Serial    Design  Full WearPct
----   ------    ------  ---- -------
LAP-12 ABC123     56000 38400    31.4
LAP-08 DEF456     56000 49200    12.1
LAP-15 GHI789     56000 54800     2.1

"Lid closed, no sleep" diagnostic

When closing the lid no longer suspends the machine, walk through this sequence.

cmd
rem 1. Verify sleep is available
powercfg /a

rem 2. Confirm the lid-close action
powercfg /q SCHEME_CURRENT SUB_BUTTONS LIDACTION

rem 3. Show outstanding sleep requests
powercfg /requests

rem 4. Run a 60s energy trace
powercfg /energy /output %TEMP%\energy.html

Output: (combined — each step prints its own report; see individual command outputs above)

Battery-saver script for kiosk machines

A kiosk wakes from sleep only on power-button press, never on network or RTC.

cmd
@echo off
powercfg /setactive SCHEME_BALANCED
rem Lid action: do nothing
powercfg /setacvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 0
powercfg /setdcvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 0
rem Disable wake timers
powercfg /setacvalueindex SCHEME_CURRENT SUB_SLEEP RTCWAKE 0
powercfg /setdcvalueindex SCHEME_CURRENT SUB_SLEEP RTCWAKE 0
rem Disable WoL
for /f "tokens=*" %%d in ('powercfg /devicequery wake_armed') do (
    powercfg /devicedisablewake "%%d"
)
powercfg /setactive SCHEME_CURRENT
echo Kiosk power policy applied.

Output:

text
Kiosk power policy applied.

Pre-deploy a custom plan via .pow

cmd
rem On the gold image
powercfg /export C:\Config\gold.pow SCHEME_CURRENT

rem On each target via PowerShell remoting
Invoke-Command -ComputerName (gc hosts.txt) -ScriptBlock {
    Copy-Item \\fileserver\config\gold.pow C:\Temp\gold.pow
    $out = powercfg /import C:\Temp\gold.pow
    $guid = ($out -split '\s')[3]
    powercfg /setactive $guid
}

Output: (none — exits 0 on success on each host)

Calculate uptime spent in each power state

The SRUM database has this; powercfg /srumutil dumps it as CSV.

cmd
powercfg /srumutil /output %TEMP%\srum.csv /csv
powershell -NoProfile -Command "Import-Csv $env:TEMP\srum.csv | Group-Object PowerState | Sort-Object Count -Descending | Format-Table Count,Name -AutoSize"

Output:

yaml
Count Name
----- ----
 8124 Active
 1432 ConnectedStandby
   42 Sleep
   12 Hibernate

Catch a runaway "preventing sleep" process

When a process consistently shows up in /requests blocking sleep, append a daily snapshot to a log so you can correlate with user complaints.

powershell
$log = "C:\Logs\sleep-requests_$(Get-Date -Format yyyy-MM).log"
"--- $(Get-Date -Format s) ---" | Add-Content $log
powercfg /requests | Add-Content $log

Reduce hiberfil.sys when disk is tight

The reduced hibernation file is half the size of full and only supports Fast Startup, not real hibernation.

cmd
rem Trim hiberfil.sys to ~40% of RAM
powercfg /h /type reduced
powercfg /h /size 50
dir C:\hiberfil.sys

Output:

swift
05/25/2026  10:14         8,589,934,592 hiberfil.sys
  • logman — the underlying ETW machinery powercfg /energy uses.
  • schtasks — investigate wake timers and WakeToRun=true tasks.
  • wevtutil — Kernel-Power events (sleep/resume/unexpected reboot).
  • sc — the Power service that hosts all of powercfg.
  • systeminfo — pair with powercfg /a for a complete platform snapshot.
  • driverquery — drivers blocking selective suspend show up here.
  • bcdedit — hypervisorlaunchtype and other boot flags interact with hibernation.

Sources