I want to write a script that will change the power settings for "turn off the display" and "put the computer into sleep mode" to "never" (see the attached screenshot). I know how to set the time for above using:
powercfg -change -monitor-timeout-ac [time]
powercfg -change -monitor-timeout-dc [time]
powercfg -change -standby-timeout-ac [time]
powercfg -change -standby-timeout-dc [time]
but I can’t find how to set it to “never”.
What is the syntax I need to use?
Thank you!

source
share