powercfgPowercfg Command Guide - Manage Windows Power Plans
Learn how to use the powercfg command in Windows to manage power plans, sleep, battery reports, and hibernation with practical examples and troubleshooting.
The powercfg command is a built-in Windows utility for viewing and changing power plans, sleep timers, hibernation behavior, and battery diagnostics from Command Prompt. It is the fastest way to automate enterprise power policy, generate detailed energy reports, and fix laptops or desktops that sleep, wake, or drain battery incorrectly.
If you manage many systems, troubleshoot battery issues, or need predictable power behavior for servers and workstations, powercfg is more reliable than clicking through multiple Control Panel pages. It provides scriptable, repeatable control for IT administrators and power users.
This guide covers syntax, options, practical examples, common use cases, best practices, troubleshooting, related commands, FAQs, and a quick reference card so you can use the powercfg command confidently.
What Is the Powercfg Command?
powercfg is Microsoft’s command-line interface for Windows power management. It works in Command Prompt and PowerShell on modern Windows versions and supports inspecting active plans, switching schemes, changing timeout values, generating reports, and controlling hibernation.
Use it when you need consistent behavior across many endpoints, when GUI options are missing or greyed out, or when you want logs and reports for troubleshooting. It is especially valuable in enterprise environments where battery health, sleep reliability, and policy compliance affect productivity and device lifecycle costs.
Powercfg Command Syntax
powercfg /option [arguments]
| Option | Purpose | Example |
|---|---|---|
/list | Show all power schemes | powercfg /list |
/setactive <GUID> | Activate a plan by GUID | powercfg /setactive SCHEME_BALANCED |
/change | Change timeout values quickly | powercfg /change standby-timeout-ac 30 |
| `/hibernate on | off` | Enable or disable hibernation |
/batteryreport | Generate battery report HTML | powercfg /batteryreport |
/energy | Generate energy diagnostics report | powercfg /energy |
/devicequery wake_armed | Show devices allowed to wake PC | powercfg /devicequery wake_armed |
/lastwake | Show what woke the system last | powercfg /lastwake |
Parameters and Options
List Plans (/list)
Shows all available schemes and highlights the active one. This is your first step before any change.
Switch Plan (/setactive)
Sets the current plan using a GUID or alias like SCHEME_BALANCED. Useful in login scripts and provisioning workflows.
Adjust Timeouts (/change)
Changes display, sleep, disk, and hibernate timeouts. Works quickly for standard policy updates.
Hibernation Control (/hibernate)
Enables or disables hibernation and can reclaim disk space when disabled.
Reporting (/batteryreport, /energy)
Creates actionable reports for diagnostics, battery capacity trends, and misconfigured power settings.
Practical Powercfg Examples
1) Show all available power plans
powercfg /list
Use this to capture plan GUIDs before automation. Expected output includes plans like Balanced, High Performance, and Power Saver.
2) Set Balanced as the active plan
powercfg /setactive SCHEME_BALANCED
This ensures predictable behavior after users or vendor utilities changed defaults.
3) Set sleep timeout to 30 minutes on AC
powercfg /change standby-timeout-ac 30
Great for enterprise policy baselines where desktops should not remain active overnight.
4) Set sleep timeout to 10 minutes on battery
powercfg /change standby-timeout-dc 10
Improves battery endurance for mobile users while keeping enough idle buffer for productivity.
5) Disable hibernation to recover disk space
powercfg /hibernate off
Removes hiberfil.sys and can reclaim several GB. Use with caution on laptops that rely on Fast Startup.
6) Re-enable hibernation after troubleshooting
powercfg /hibernate on
Restores hibernate support and Fast Startup dependencies when needed.
7) Generate battery report
powercfg /batteryreport /output C:\Temp\battery-report.html
Use this in support workflows to compare design capacity versus full charge capacity and detect battery wear.
8) Generate energy efficiency report
powercfg /energy /output C:\Temp\energy-report.html
This identifies timer settings, device wake issues, and drivers preventing sleep.
9) Find devices that can wake the PC
powercfg /devicequery wake_armed
Helpful when systems wake unexpectedly at night due to NICs, keyboards, or USB devices.
10) Check the last wake source
powercfg /lastwake
Use after unwanted wake events to identify the exact trigger and then disable wake permissions if necessary.
Common Use Cases
- Enterprise baseline enforcement - Standardize timeout and sleep behavior across departments with startup scripts.
- Battery health audits - Use
batteryreportmonthly to detect aging batteries before user complaints increase. - Wake-from-sleep incidents - Combine
lastwakeanddevicequeryto stop unwanted overnight wake events. - VDI and kiosk optimization - Prevent aggressive sleep settings from interrupting dedicated devices.
- Performance tuning - Switch selected workstations to high-performance plans for build servers or rendering.
- Power cost reduction - Reduce AC idle timeouts in office fleets to lower electricity use.
- Post-image hardening - Reapply expected power schemes after OS deployment.
- Support playbooks - Include report generation in helpdesk triage templates.
- Hybrid work laptop policy - Different AC/DC settings improve usability and battery runtime.
- Compliance reporting - Store generated reports as evidence for operations reviews.
Tips and Best Practices
- Run elevated Command Prompt for full report and configuration access.
- Export plan settings before large changes in managed environments.
- Use aliases like
SCHEME_BALANCEDwhen possible for readability. - Test AC and DC behavior separately on laptops.
- Validate with a pilot group before fleet rollout.
- Pair policy changes with user communication to avoid confusion.
- Keep report output paths standardized for ticketing systems.
- Review BIOS/UEFI settings if OS-level changes do not stick.
- Check vendor utilities that may override Windows plans.
- Log commands in scripts for traceability.
Troubleshooting Common Issues
Access denied or command fails
Run CMD as Administrator. Many powercfg options require elevation.
Settings revert after reboot
Vendor power utilities or Group Policy may overwrite local values. Align local scripts with domain policy.
Sleep still not working
Use powercfg /energy and inspect drivers, wake timers, and USB settings flagged in the report.
Computer wakes unexpectedly
Use powercfg /lastwake and powercfg /devicequery wake_armed, then disable wake permissions for nonessential devices.
Battery report not generated
Confirm output path exists and you have write permissions, then rerun with an explicit output location.
Related Commands
shutdown - Controlled power state transitions
Use shutdown for immediate or scheduled shutdown/restart actions, while powercfg defines long-term behavior.
systeminfo - Hardware and OS context
Gather system context before diagnosing power problems to confirm model, BIOS, and OS build.
taskschd / schtasks - Scheduled power workflows
Combine with schtasks to run maintenance during active hours and avoid user disruption.
driverquery - Driver auditing
Driver issues often cause power instability. Use driverquery to inspect versions during diagnostics.
Frequently Asked Questions
What does the powercfg command do?
The powercfg command manages Windows power settings from the command line. It can list or activate power plans, modify sleep and display timeouts, enable or disable hibernation, and generate diagnostic reports like battery health and energy analysis.
Is powercfg safe for enterprise automation?
Yes, when tested and documented. Use controlled rollout, validate AC/DC behavior, and avoid disabling hibernation globally unless you understand endpoint requirements like Fast Startup.
How do I switch to High Performance mode?
Run powercfg /setactive SCHEME_MIN on systems where that alias maps to High Performance, or use the exact GUID from powercfg /list.
How do I disable hibernation?
Use powercfg /hibernate off in an elevated prompt. This also removes hiberfil.sys, reclaiming disk space.
Why does my PC wake up by itself?
Wake-capable devices, scheduled timers, and updates are common causes. Check powercfg /lastwake and powercfg /devicequery wake_armed to identify triggers.
Can I generate a battery report for support tickets?
Yes. Run powercfg /batteryreport /output C:\Temp\battery-report.html and attach the file to your ticket or audit record.
Why are my settings not applying?
Group Policy or OEM tools may override them. Confirm domain policy objects and disable conflicting OEM profiles if your org standardizes on Windows plans.
Does powercfg work in PowerShell?
Yes, it runs normally in PowerShell and Command Prompt. Syntax remains the same.
Quick Reference Card
| Command | Purpose | Example |
|---|---|---|
powercfg /list | Show plans | Identify active GUID |
powercfg /setactive SCHEME_BALANCED | Set balanced mode | Standard office profile |
powercfg /change standby-timeout-ac 30 | AC sleep timeout | Reduce idle power draw |
powercfg /change standby-timeout-dc 10 | Battery sleep timeout | Extend battery life |
powercfg /hibernate off | Disable hibernate | Reclaim disk space |
powercfg /batteryreport | Battery diagnostics | Lifecycle and wear checks |
powercfg /energy | Energy analysis | Detect sleep blockers |
powercfg /lastwake | Wake source | Investigate overnight wake |
Try It in the Simulator
Practice core command behavior in our Windows Command Simulator, browse related tools in the Commands Reference, and continue with nearby guides from the blog index. For team training, use a shared checklist and standard command snippets in your internal runbooks.
Summary
The powercfg command is the primary Windows CLI tool for power plans, sleep policy, hibernation, and diagnostic reporting. It is especially useful for IT professionals who need repeatable configuration, not one-off GUI clicks.
Start with /list, apply changes with /setactive or /change, and validate results using /energy, /batteryreport, and wake diagnostics. That sequence keeps troubleshooting structured and fast.
When used with pilot testing, policy alignment, and script logging, powercfg becomes a reliable foundation for enterprise power management, better battery outcomes, and fewer helpdesk incidents.