I want to write a script that will change the power settings for "turn off the display" and "put the computer to sleep" to "never" (see attached screenshot). I know how to set times for the 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!
Try this:
powercfg -change -monitor-timeout-ac 0
Per this, my favorite reference for missing help switch/parameter information: http://ss64.com/nt/powercfg.html
Setting any value to 0 will set the timeout=Never
Thanks to Cristian, official documentation with additional parameters is currently available here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With