Powershell scripts for Lenovo compatible with Lenovo laptops which use Lenovo System Interface Foundation to activate the backlight. Tested using ThinkPad E580
- Lenovo System Interface Foundation
- auto-keyboard-backlight.ps1 (enables or disables the keyboard backlight)
- Run script with Powershell 32-bit (x86) located 'C:\Windows\syswow64\WindowsPowerShell\v1.0\powershell.exe'
If you want to schedule the script, we'll need to do this with task scheduler. This will cover:
- Boot
- Sleep & wakeup
- Hibernation & wakeup
To schedule with Task Scheduler:
- Click 'Create Task'.
- Choose 'Run whether user is logged in or not'. (ensure user that executes this script has necessary permissions)
- Add a trigger 'At startup'.
- Add a trigger 'On an event' if you want to support sleep and hibernation. You'll need to find the EventID in Windows Event Manager.
- Log: 'System'
- Source: 'Power-Troubleshooter'
- EventID: 1
- Add an action with 'Program/script' location set to 'C:\Windows\syswow64\WindowsPowerShell\v1.0\powershell.exe' and parameters '-File "path\to\script\auto-keyboard-backlight.ps1"'
You may need to either adjust the Powershell execution policies or sign the Powershell script if you plan on safely deploying this in your company.