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.