Batch File Caps Lock Num Lock [360p]

To force a key to be "ON" only if it is currently "OFF," use PowerShell to check the status first.

powershell.exe -Command "$wsh = New-Object -ComObject WScript.Shell; $wsh.SendKeys('{NUMLOCK}')" Ensuring a Specific State (IF Logic) Batch File Caps Lock Num Lock

powershell.exe -Command "$wsh = New-Object -ComObject WScript.Shell; $wsh.SendKeys('{CAPSLOCK}')" To force a key to be "ON" only