I would like to turn on and off the “Num Lock” key on the keyboard. I have tried several examples on the Internet and here, without success. This is the closest solution to me:
[void] [System.Reflection.Assembly]::LoadWithPartialName("'System.Windows.Forms") [System.Windows.Forms.SendKeys]::SendWait("{NUMLOCK}")
The above code looks like it can work, and I see the “Num Lock” indicator on my keyboard for a second, but it does not “stick”.
Vippy source share