DEV Community

terminalpuncher.com
terminalpuncher.com

Posted on

9

Preventing Lock Screen Timeout When Idle using PowerShell

Run this code within PowerShell to prevent lockouts when Idle. Simply and Effective.

$WShell = New-Object -Com Wscript.Shell
while (1) {$WShell.SendKeys("{SCROLLLOCK}"); sleep 60}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Sentry image

Make it make sense

Make sense of fixing your code with straight-forward application monitoring.

Start debugging →

👋 Kindness is contagious

Dive into this thoughtful article, cherished within the supportive DEV Community. Coders of every background are encouraged to share and grow our collective expertise.

A genuine "thank you" can brighten someone’s day—drop your appreciation in the comments below!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found value here? A quick thank you to the author makes a big difference.

Okay