Skip to content

Instantly share code, notes, and snippets.

@altbdoor
Created February 27, 2016 13:48
Show Gist options
  • Save altbdoor/d26f8902a9cab0cd2814 to your computer and use it in GitHub Desktop.
Save altbdoor/d26f8902a9cab0cd2814 to your computer and use it in GitHub Desktop.
Switch between High Performance and Energy Saver mode in Windows.
set HIGHPERF= 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
for /f "tokens=2 delims=:(" %%x in ('powercfg.exe -getactivescheme') do set ACTIVE=%%x
if /i %ACTIVE%==%HIGHPERF% (
powercfg.exe -s a1841308-3541-4fab-bc81-f71556f20b4a
) else (
powercfg.exe -s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment