[英]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 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为此,我最喜欢的缺少帮助开关/参数信息的参考: http : //ss64.com/nt/powercfg.html
Setting any value to 0 will set the timeout=Never
将任何值设置为 0 将设置 timeout=Never
Thanks to Cristian, official documentation with additional parameters is currently available here感谢 Cristian, 目前可以在此处获得带有附加参数的官方文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.