Tuesday 9 February 2021

Yes, you can control various power settings with Command Prompt, and in this guide, we'll show you the steps to use the powercfg tool to complete many power tasks on Windows 10.

On Windows 10, powercfg is a handy command-line tool that has been around for many years, and it allows you to manage many aspects of power plans (also known as power schemes).

For instance, you can create, edit, and delete power plans. You can enable, customize, or disable some power features, including hibernation and power button. You can use it to troubleshoot energy and battery performance. And you can even use the command-line tool to determine which devices are waking the computer during sleep or hibernation and disable them as necessary, and much more.

In this Windows 10 guide, we will walk you through the steps to use the powercfg command-line tool to manage the power settings on your computer.

How to export or import power plans with powercfg

On Windows 10, you can use Command Prompt to export and import power plans to the same or different computer.

Export power plan

To export a power plan using command-line, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to generate a list of available power plans and press Enter:

    powercfg /list

  4. Type the following command to export the scheme to the ".pow" file and press Enter:

    powercfg /export PATH\TO\FILENAME PLAN-GUID

    In the command, specify the path to export the scheme and GUID as shown in the output of step No. 3.

    For example, this command exports the "High performance" plan into the "high-performance.pow" file in the "C" drive:

    powercfg /export C:\high-performance.pow 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

Once you complete the steps, the plan will be exported into the ".pow" file you specified in the command.

Import power plan

To import a power plan on Windows 10 with Command Prompt, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to import the scheme to the ".pow" file and press Enter:

    powercfg /import PATH\TO\FILENAME

    In the command, specify the path to the exported file.

    For example, this command imports the plan from the "high-performance.pow" file in the "C" drive:

    powercfg /import C:\high-performance.pow

After you complete the steps, the power scheme will be imported to the device.

How to enable or disable hibernation with powercfg

On Windows 10, hibernation is a feature designed to save power by saving the contents loaded in memory onto the hard drive, allowing the computer to shut down without losing your current session. The next time you turn on the device, you can resume where you left off.

If you need to configure hibernation, the powercfg command-tool lets you enable, manage and disable the feature with a few simple commands.

Enable hibernation

To enable hibernation, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to confirm that hibernation is supported on your hardware configuration and press Enter:

    powercfg /availablesleepstates

    If Hibernate shows up in the available states on your computer, then you can enable the feature.

  4. Type the following command to enable hibernation on Windows 10 and press Enter:

    powercfg /hibernate on

  5. (Optional) Type the following command to reduce the size of the hibernation file (hiberfil.sys) and press Enter:

    powercfg /hibernate /type reduced

    The "reduced" type enables "fast startup" without the need for hibernating. This option reduces the hibernation file to about half the usual size. When using this option, the hibernate option in the power menu will no longer be available.

    Quick note: If you use a custom size for the size hibernation file, you must first run the powercfg /hibernate /size 0 to avoid errors when running the "reduced" command.

  6. (Optional) Type the following command to change the size of the hibernation file as a percentage (50% or larger) of the memory size and press Enter:

    powercfg /hibernate /size 100

    In the command, replace 100 with any percentage greater than 50.

Once you complete the steps, hibernation will enable according to your configuration.

Disable hibernation

To disable hibernation on Windows 10, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to enable hibernation on Windows 10 and press Enter:

    powercfg /hibernate off

After you complete the steps, the option to hibernate will no longer be available on Windows 10.

How to create power plan with powercfg

You can also create power plans with custom configurations. However, there is not an option to create a new plan. Instead, you have to duplicate an existing plan and modify it to your requirements.

To create a power plan on Windows 10 with the powercfg tool, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to generate a list of available power plans and press Enter:

    powercfg /list

  4. Type the following command to create a new power plan and press Enter:

    powercfg /duplicatescheme GUID

    In the command, replace GUID for power scheme GUID.

    For example, this command makes a copy of the High performance plan:

    powercfg /duplicatescheme 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

    Quick tip: In the output, note the GUID for the power plan.

  5. Type the following command to rename the power plan and press Enter:

    powercfg /changename GUID "NEW-PLAN-NAME"

    In the command, replace GUID with the new power scheme GUID you want to rename and "NEW-PLAN-NAME" with the new plan's name.

    For example, this command assigns the "Super performance" name to the newly created power plan:

    powercfg /changename ac093644-6503-4314-b3b6-0b601924e3e9 "My power settings"

  6. (Optional) Type the following command to confirm the new plan was created successfully and press Enter:

    powercfg /list

  7. (Optional) Type the following command to set the new power plan as system default and press Enter:

    powercfg /setactive GUID

    In the command, replace GUID with the new power scheme GUID.

    For example, this command set the "Super performance" scheme as new default:

    powercfg /setactive ac093644-6503-4314-b3b6-0b601924e3e9

Once you complete the steps, the power scheme will be created and available on your computer.

How to modify power plan with powercfg

If you need to customize an existing power plan, the powercfg tool includes a few ways to change the available settings.

Change plan settings

To change the Windows 10 power plan settings with commands, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to change the settings of the power plan and press Enter:

    powercfg /change OPTION TIME

    In the command, replace OPTION with the power setting you want to modify and TIME with a new time in minutes.

    For example, this command turns off the display after 15 minutes of inactivity while the computer is plugged in:

    powercfg /change monitor-timeout-ac 15

    Options available for the /change option include:

    • standby-timeout-ac
    • standby-timeout-dc
    • disk-timeout-ac
    • disk-timeout-dc
    • hibernate-timeout-ac
    • hibernate-timeout-dc
    • monitor-timeout-ac
    • monitor-timeout-dc

After you complete the steps, the changes will apply immediately to the currently active power plan.

Change power button settings

In addition to customizing the plan settings, you can also change other power options, such as the power button's default action.

To change the power button action with powercfg, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to change the default action for the power button when the laptop is plugged in and press Enter:

    powercfg /setacvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 0

    In the command, the syntax ends with "0," this is the index value that defines the action, and you must change it to reflect what you want the power button to do.

    Here are the available values you can use with their respective action:

    • 0 – Do nothing.
    • 1 – Sleep.
    • 2 – Hibernate.
    • 3 – Shut down.
    • 4 – Turn off the display.
  4. Type the following command to change the default action for the power button when the laptop is running in battery and press Enter:

    powercfg /setdcvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 0

  5. Type the following command to apply the changes and press Enter:

    powercfg -setactive SCHEME_CURRENT

Once you complete the steps, the next time you press the power button, the action will reflect the configuration you specified in the command.

Delete plan settings

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to list all the available power settings and press Enter:

    powercfg /query

  4. Type the following command to delete a specific power setting and press Enter:

    powercfg /deletesetting SUB-GUID SETTING-GUID

    In the command, replace SUB-GUID with the Subgroup GUID and the SETTING-GUID with the Power Setting GUID you want to delete.

    For instance, this commands removes the "Turn off hard disk after" option from the "Super performance" plan:

    powercfg /deletesetting 0012ee47-9041-4b5d-9b77-535fba8b1442 6738e2c4-e8a5-4a42-b16a-e040e769756e

After you complete the steps, you need to repeat step No. 4 to remove additional settings.

How to delete power plan with powercfg

To delete a power plan on Windows 10 with the powercfg command tool, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to generate a list of available power plans and press Enter:

    powercfg /list

  4. Type the following command to create a new power plan and press Enter:

    powercfg /delete GUID

    In the command, replace GUID for power scheme GUID as shown in the step No. 3.

    For example, this command deletes the "My power settings" plan:

    powercfg /delete ac093644-6503-4314-b3b6-0b601924e3e9

    Quick tip: If the plan you are trying to delete is active, then you won't be able to remove it until you set another power scheme as the default (see steps below).

Once you complete the steps, the power scheme will no longer be available on Windows 10.

How to change power plan with powercfg

To set another power plan as the new default on Windows 10, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to generate a list of available power plans and press Enter:

    powercfg /list

  4. Type the following command to change the current power plan and press Enter:

    powercfg /setactive GUID

    In the command, replace GUID for power scheme GUID as shown in step No. 3.

    For example, this command sets the "Balanced" plan:

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

  5. (Optional) Type the following command to confirm the active power scheme and press Enter:

    powercfg /getactivescheme

After you complete the steps, Windows 10 will start using the new power plan configuration.

How to report action woke device powercfg

To see what woke the system during the last sleep state on Windows 10, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to understand the reason the system woke during the last sleep transition and press Enter:

    powercfg /lastwake

Once you complete the steps, if a device woke up the system, it will be listed in the output.

How to determine wake timers with powercfg

To find out the devices that can wake the system, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to view the active wake timers on Windows 10 and press Enter:

    powercfg /waketimers

  4. Type the following command to view app and driver power requests and press Enter:

    powercfg /requests

After you complete the steps, you will better understand the devices, apps, and drivers that can actively wake the system from sleep or hibernation.

How to generate battery report with powercfg

If you have a laptop and notice performance issues with the battery, you can create a report with the power command-line tool to determine information (such as brand, capacity, cycle count, recent usage, battery life estimates, etc.) to help you decide whether or not it is time to replace the battery.

To create a battery report with Command Prompt, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to create a battery report and press Enter:

    powercfg /batteryreport

  4. Use the Windows key + Run to open the Run command.
  5. Type the following path and press Enter:

    C:\battery-report.html

Once you complete the steps, you can review the battery report in your default web browser. You can learn more about the battery report on Windows 10 in this guide.

How to generate energy report with powercfg

You can also create an energy report that collects power behavior for a certain amount of time, which you can then analyze to determine the root of energy and battery problems.

To generate a energy report on Windows 10, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to create an energy report and press Enter:

    powercfg /energy

    Quick note: The default command will run for 60 seconds, but you can use the /duration SECONDS option to specify how long the tool will monitor the power behavior to create a report. For example, you can use the powercfg /energy /duration 120 to run the command for two minutes.

  4. Use the Windows key + Run keyboard shortcut to open the Run command.
  5. Type the following path and press Enter:

    C:\energy-report.html

After you complete the steps, you can review the report to understand the energy and battery efficiency to investigate and resolve power problems on Windows 10.

How to view available sleep states with powercfg

To view the supported sleep states available on your computer, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to determine the supported sleep states of your computer and press Enter:

    powercfg /availablesleepstates

    Here is a list of the all the available sleep states on your device:

    • Standby (S3).
    • Standby (S2).
    • Standby (S1).
    • Hibernate.
    • Hybrid Sleep.
    • Fast Startup.

Once you complete the steps, you will get a list of the sleep states that are supported and those features that are not supported.

How to enable or disable devices that can wake the system with powercfg

On Windows 10, some devices (such as network adapters) can wake the system from sleep or hibernation to perform a specific task. If you must control this feature, the powercfg command includes options to automatically enable or disable the device's ability to start the system automatically.

Usually, these options will come in handy to stop the computer from waking up during the night for no apparent reason. Or when you must configure the device to be started remotely using wake-on-LAN (WOL), for example.

Enable device wake feature

To allow a device to wake the system during sleep or hibernation, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to review devices currently not set to wake the computer and press Enter:

    powercfg /devicequery wake_programmable

  4. Type the following command to disable its wake functionality and press Enter:

    powercfg /deviceenableawake "DEVICE-NAME"

    In the command, replace "DEVICE-NAME" with the name of the device you want to enable, as shown in step No. 3.

    For example, this command allows the Ethernet adapter to wake up the system:

    powercfg /deviceenablewake "Intel(R) 82574L Gigabit Network Connection"

  5. (Optional) Type the following command to confirm the device has been disable and press Enter:

    powercfg /devicequery wake_armed

  6. Confirm the device name appears in the list.

After you complete the steps, the device will be able to wake the computer while it is in sleep or hibernation mode.

Disable device wake feature

To prevent a device from waking the system from sleep or hibernation, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to review devices allowed to wake the computer and press Enter:

    powercfg /devicequery wake_armed

  4. Type the following command to disable its wake functionality and press Enter:

    powercfg /devicedisablewake "DEVICE-NAME"

    In the command, replace "DEVICE-NAME" with the name of the device you want to disable, as shown in step No. 3.

    For example, this command disable the Ethernet adapter from waking up the computer:

    powercfg /devicedisablewake "Intel(R) 82574L Gigabit Network Connection"

  5. (Optional) Type the following command to confirm the device has been disable and press Enter:

    powercfg /devicequery wake_armed

  6. Confirm the device name you disabled is no longer showing in the command output.

Once you complete the steps, the device will longer be able to wake the system from any power state mode.

We are focusing this guide on the most useful options, but the command-line tool includes some additional features, which you can list using the powercfg /? command.

More Windows 10 resources

For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:



0 comments:

Post a Comment

ShortNewsWeb

Blog Archive

Categories

'The Woks of Life' Reminded Me to Cook With All the Flavors I Love (1) 13 of the Best Spooky Episodes From (Mostly) Un-Spooky Shows (1) 1Password Now Generates QR Codes to Share Wifi Passwords (1) 2024 (13) 30 Movies and TV Shows That Are Basically 'Competence Porn' (1) 30 of the Most Obscenely Patriotic Movies Ever (1) 40 Netflix Original Series You Should Watch (1) Active Directory (1) Adobe's AI Video Generator Might Be as Good as OpenAI's (1) AIX (1) and Max Bundle Isn't a Terrible Deal (1) Apache (2) Apple Intelligence Is Running Late (1) Apple Intelligence's Instructions Reveal How Apple Is Directing Its New AI (1) August 18 (1) August 4 (1) August 5 (1) Backup & Restore (2) best practices (1) bleepingcomputer (42) Blink Security Cameras Are up to 68% Off Ahead of Prime Day (1) CentOS (1) Configure PowerPath on Solaris (1) Documents (2) Don't Rely on a 'Monte Carlo' Retirement Analysis (1) Eight Cleaning Products TikTok Absolutely Loves (1) Eight of the Best Methods for Studying so You Actually Retain the Information (1) Eight Unexpected Ways a Restaurant Can Mislead You (1) Elevate Your Boring Store-Bought Pretzels With This Simple Seasoning Technique (1) Everything Announced at Apple's iPhone 16 Event (1) file system (6) Find (1) Five Red Flags to Look for in Any Restaurant (1) Flappy Bird's Creator Has Nothing to Do With Its 'Remake' (1) Four Signs Thieves Are Casing Your House (1) gaming (1) Hackers Now Have Access to 10 Billion Stolen Passwords (1) How I Finally Organized My Closet With a Digital Inventory System (1) How to Cancel Your Amazon Prime Membership After Prime Day Is Over (1) How to Choose the Best Weightlifting Straps for Your Workout (1) How to Keep Squirrels Off Your Bird Feeders (1) How to Take a Screenshot on a Mac (1) How to Take Full Control of Your Notifications on a Chromebook (1) Hulu (1) If You Got a Package You Didn't Order (1) Important Questions (17) Install and Configure PowerPath (1) interview questions for linux (2) Is ‘Ultra-Processed’ Food Really That Bad for You? (1) Is Amazon Prime Really Worth It? (1) It Might Be a Scam (1) July 14 (1) July 21 (1) July 28 (1) July 7 (1) June 30 (1) LifeHacker (89) Linux (36) Meta Releases Largest Open-Source AI Model Yet (1) Monitoring (3) music (688) My Favorite 14TB Hard Drive Is 25% Off Right Now (1) My Favorite Amazon Deal of the Day: Apple AirPods Max (2) My Favorite Amazon Deal of the Day: Google Nest Mesh WiFi Router (1) My Favorite Amazon Deal of the Day: Google Pixel 8 (1) My Favorite Amazon Deal of the Day: SHOKZ OpenMove Bone Conduction Headphones (1) My Favorite Tools for Managing Cords and Cables (1) Nagios (2) Newtorking (1) NFS (1) OMG! Ubuntu! (688) Oracle Linux (1) oracleasm (3) osnews (21) Password less communication (1) Patching (2) Poaching Is the Secret to Perfect Corn on the Cob (1) powerpath (1) Prioritize Your To-Do List By Imagining Rocks in a Jar (1) Red Hat Exam (1) register (36) Rsync (1) Safari’s ‘Distraction Control’ Will Help You Banish (Some) Pop Ups (1) Samba (1) Scrcpy (1) September 1 (1) September 15 (1) September 2 (1) September 22 (1) September 8 (1) Seven Home 'Upgrades' That Aren’t Worth the Money (1) ssh (1) Swift Shift Is the Window Management Tool Apple Should Have Built (1) System hardening (1) Target’s Answer to Prime Day Starts July 7 (1) Tech (9532) Tech CENTRAL (15) Technical stories (89) technpina (6) The 30 Best Movies of the 2020s so Far (and Where to Watch Them) (1) The 30 Best Sports Movies You Can Stream Right Now (1) The Best Deals on Robot Vacuums for Amazon’s Early Prime Day Sale (1) The Best Deals on Ryobi Tools During Home Depot's Labor Day Sale (1) The Best Early Prime Day Sales on Power Tools (1) The Best Places to Go When You Don't Want to Be Around Kids (1) The Best Strategies for Lowering Your Credit Card Interest Rate (1) The Best Ways to Store All Your Bags and Purses (1) The New Disney+ (1) The Two Best Times of Year to Look for a New Job (1) These Milwaukee Tools Are up to 69% off Right Now (1) This Google Nest Pro Is 30% Off for Prime Day (1) This Peanut Butter Latte Isn’t As Weird As It Sounds (1) This Tech Brand Will Get the Biggest Discounts During Prime Day (1) Three Quick Ways to Shorten a Necklace (1) Today’s Wordle Hints (and Answer) for Monday (2) Today’s Wordle Hints (and Answer) for Sunday (11) Try 'Pile Cleaning' When Your Mess Is Overwhelming (1) Ubuntu News (344) Ubuntu! (1) Unix (1) Use This App to Sync Apple Reminders With Your iPhone Calendar (1) veritas (2) Videos (1) Was ChatGPT Really Starting Conversations With Users? (1) Watch Out for These Red Flags in a Realtor Contract (1) Wayfair Is Having a '72-Hour Closeout' Sale to Compete With Prime Day (1) We Now Know When Google Will Roll Out Android 15 (1) What Is the 'Die With Zero' Movement (and Is It Right for You)? (1) What Not to Do When Training for a Marathon (1) What's New on Prime Video and Freevee in September 2024 (1) Windows (5) You Can Easily Add Words to Your Mac's Dictionary (1) You Can Get 'World War Z' on Sale for $19 Right Now (1) You Can Get a Membership to BJ's for Practically Free Right Now (1) You Can Get Beats Studio Buds+ on Sale for $100 Right Now (1) You Can Get Microsoft Visio 2021 Pro on Sale for $20 Right Now (1) You Can Get This 12-Port USB-C Hub on Sale for $90 Right Now (1) You Can Get This Roomba E5 Robot Vacuum on Sale for $170 Right Now (1) You Can Hire Your Own Personal HR Department (1) You Can Set Different Scrolling Directions for Your Mac’s Mouse and Trackpad (1)

Recent Comments

Popular Posts

Translate

My Blog List

Popular

System Admin Share

Total Pageviews