Skip to content

Instantly share code, notes, and snippets.

@nicksterx
Created October 7, 2019 18:30
Show Gist options
  • Select an option

  • Save nicksterx/0a8e68a129b014b8c6ec162e880c504d to your computer and use it in GitHub Desktop.

Select an option

Save nicksterx/0a8e68a129b014b8c6ec162e880c504d to your computer and use it in GitHub Desktop.

Revisions

  1. nicksterx created this gist Oct 7, 2019.
    12 changes: 12 additions & 0 deletions KeyboardLeds.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    $wsh = New-Object -ComObject WScript.Shell
    $speed = 100
    while ($speed -gt 0) {
    $wsh.SendKeys('{NUMLOCK}')
    Start-Sleep -Milliseconds $speed
    $wsh.SendKeys('{CAPSLOCK}')
    Start-Sleep -Milliseconds $speed
    $wsh.SendKeys('{SCROLLLOCK}')
    Start-Sleep -Milliseconds $speed
    $speed=$speed-1
    Write-Host $speed
    }