Skip to content

Instantly share code, notes, and snippets.

@mmpx12
Last active October 7, 2025 10:27
Show Gist options
  • Select an option

  • Save mmpx12/0e507dc4d73547647b70b212eb42e3a6 to your computer and use it in GitHub Desktop.

Select an option

Save mmpx12/0e507dc4d73547647b70b212eb42e3a6 to your computer and use it in GitHub Desktop.
prevent sleep and keep team status green
# Simulate pressing CAPSLOCK every minute
$WShell = New-Object -ComObject "WScript.Shell"
while ($true) {
$WShell.SendKeys('{CAPSLOCK}')
Start-Sleep -Seconds 60
}
# one line for easy copy-paste
$wsh=New-Object -Com "WScript.Shell";while($true){$wsh.SendKeys('{CAPSLOCK}');sleep 200}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment