Dave's Brain

Browse - Programming Tips - How can I change the power scheme in a batch script?

Date: 2013oct31
OS: Windows
Keywords: power plan

Q. How can I change the power scheme in a batch script?

A.  Use the powercfg command.

To list existing power schemes:

powercfg /list
To change to one of them:
powercfg -s <guid>
For example:
powercfg -s 381b4222-f694-41f0-9685-ff5bb260df2e
To make sure the computer doesn't go to sleep while something important is running switch to the High Performance scheme.

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.