How to Prevent Screen Timeout While Using PowerShell?

0
12
Asked By CuriousCoder42 On

Hey everyone,

At my workplace, the screen is set to timeout after 10 minutes, which can be inconvenient since we monitor cameras and sometimes use YouTube for playback. Right now, I have a Windows executable running in a PowerShell window that displays an analog clock, but it doesn't prevent the screen from timing out.

I'm wondering if there's a way to modify PowerShell settings to keep the screen active without messing with the executable or source code. Alternatively, would it be possible to change the source to create a new executable that could achieve this effect? I'm not really experienced with this kind of coding, so any suggestions would be appreciated!

Thanks!

5 Answers

Answered By CaffeineFan74 On

While I can't open the script right now, I’ve been using a program called Caffeine from Zhorn for many years. It simulates pressing an F key every minute to keep the screen awake. I set mine to press it every 45 seconds with the Shift key and disabled sticky keys in Windows settings.

Answered By VBSScriptGuru On

I’ve created a simple VBS script that simulates pressing the F13 key every minute. It works well, although sometimes I’ve noticed it can interfere with terminal apps by inserting a tilde. But overall, it keeps the screen awake perfectly.

Answered By MouseMover89 On

If you’re open to it, a physical mouse jiggler might be a great solution for your issue. They’re inexpensive, typically around 15 bucks, and they work without needing to install any software. Check Amazon for a good one!

Answered By PowerToysUser On

The output updates in PowerShell won’t count as user activity to prevent the screen from sleeping. Instead, you might find the PowerToys Awake tool handy. It’s designed to keep your computer awake without any hassle.

Answered By ITHelper123 On

I recommend reaching out to your IT team about your situation. They might be able to provide a solution since this seems like a legitimate work requirement. It’s always best to get their input to find a proper fix.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.