Decaf caffeine: Keeping Your PC Awake with PowerShell
If you’re like me and find yourself working odd hours—especially over the weekend—you know how frustrating it can be when your PC decides to take a nap every few minutes. I often need to glance at my screen to check logs, monitor tasks, or respond to messages, and having to log back in every five minutes is a productivity killer. That’s why I built a simple PowerShell script that acts as a native replacement for the popular Caffeine software. For those unfamiliar, Caffeine is a lightweight utility that simulates a keypress to keep your machine awake. It’s handy—but many corporate environments block third-party utilities like it, leaving you stuck with default sleep settings. Why PowerShell? PowerShell is built into Windows, making it a perfect candidate for scripting solutions that bypass third-party restrictions. My script uses a loop to simulate activity at regular intervals, preventing the system from locking or going to sleep. No installs, no admin rights, no fuss. Here’s a simplif...