Created
October 15, 2021 09:50
-
-
Save mjaromi/95abc7dd1d296740fafc5239a8f86e72 to your computer and use it in GitHub Desktop.
Simple ps1 function to stay available, always
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
function Stay-Available ($seconds) { | |
while ($True) { Start-Sleep -Seconds $seconds ; $(New-Object -ComObject 'Wscript.Shell').sendkeys('{SCROLLLOCK}') } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment