Disable Windows 10 sleep via CMD

disable windows 10 sleep

Simple method to disable Windows 10 sleep via a command / batch script for users.

@echo off
for /f "tokens=4 delims= " %%i IN ('powercfg -q ^| find "Power Scheme GUID:"') do Set StrOne=%%i
for /f "tokens=3 delims= " %%i IN ('powercfg -q ^| find "(Power buttons and lid)"') do Set StrTwo=%%i 
for /f "tokens=4 delims= " %%i IN ('powercfg -q ^| find "(Lid close action)"') do Set StrThree=%%i 
powercfg -SETACVALUEINDEX %StrOne% %StrTwo% %StrThree% 000

Found priceless insights in this blog? Support the author’s creativity – buy them a coffee!

Leave a Reply

Your email address will not be published. Required fields are marked *