Created
May 25, 2023 08:49
-
-
Save tan14142/804f7b2068b97c4314d21194a4425c30 to your computer and use it in GitHub Desktop.
keep-alive.ps1
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
Clear-Host | |
Write-Output "Keep-alive with Scroll Lock..." | |
$WShell = New-Object -com "Wscript.Shell" | |
while ($true) | |
{ | |
$WShell.sendkeys("{SCROLLLOCK}") | |
Start-Sleep -Milliseconds 100 | |
$WShell.sendkeys("{SCROLLLOCK}") | |
Start-Sleep -Seconds 110 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment