-
-
Save deanbot/ac40d31b67ead5f3658093c83add7027 to your computer and use it in GitHub Desktop.
PowerShell script to keep a Windows PC awake
This file contains 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
# PowerShell script to keep a Windows PC awake | |
Write-Host "Keeping PC awake... (send Ctrl+C to quit)" | |
while (1) { | |
$wsh = New-Object -ComObject WScript.Shell | |
$wsh.SendKeys('+{F15}') | |
Start-Sleep -seconds 59 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment