How to set monitor timeout to never using powershell

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!

+4
source share
1 answer

Try the following:

powercfg -change -monitor-timeout-ac 0

In this, my favorite link to the missing tooltip / parameter information: http://ss64.com/nt/powercfg.html

0 - =

+4

All Articles