Skip to content

Instantly share code, notes, and snippets.

@mjaromi
Created October 15, 2021 09:50
Show Gist options
  • Save mjaromi/95abc7dd1d296740fafc5239a8f86e72 to your computer and use it in GitHub Desktop.
Save mjaromi/95abc7dd1d296740fafc5239a8f86e72 to your computer and use it in GitHub Desktop.
Simple ps1 function to stay available, always
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