Last active
December 24, 2025 16:14
-
-
Save karoltheguy/856b9999b5b064d0c64c5abd4199ac95 to your computer and use it in GitHub Desktop.
Keep Windows awake and not idling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $wsh = New-Object -ComObject WScript.Shell | |
| while (1) { | |
| $rd = Get-Random -Minimum 57 -Maximum 172 | |
| $wsh.SendKeys('+{F15}') | |
| Start-Sleep -Seconds $rd | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Keeps computer awake using a random amount of sleep in between key strokes