Note: for a full desktop experience, use this software that I put together to solve this problem https://github.com/SaltwaterC/KeyboardBacklightForLenovo
Quick and dirty PowerShell script for controlling backlight on newer Lenovo ThinkPads. Makes use of Keyboard_Core.dll. Inspired by this Reddit post. At the time of writing this, that post is the top Google result for something that doesn't work.
It automatically detects the version in ThinkKeyboardAddin directory and it supports passing the backlight level via command line argument. By passing the -verbose flag it prints what it does behind the scenes.
The script won't change the keyboard backlight status if the passed status is already set. This makes repeated invocation less annoying as it won't trigger an on-screen notification about the state change when there is no state to change.
.\thinkpad-backlight.ps1 -verbose
Keyboard backlight status is 0 (0=Off, 1=Dim, 2=Bright)
Keyboard backlight set to level 2 (0 = Off, 1 = Dim, 2 = Bright)
.\thinkpad-backlight.ps1 -level 1 -verbose
Keyboard backlight status is 2 (0=Off, 1=Dim, 2=Bright)
Keyboard backlight set to level 1 (0 = Off, 1 = Dim, 2 = Bright)
.\thinkpad-backlight.ps1 -level 1 -verbose
Keyboard backlight status is 1 (0=Off, 1=Dim, 2=Bright)Additionally, this may be compiled into an executable with ps2exe:
ps2exe -inputFile .\thinkpad-backlight.ps1 -outputFile .\thinkpad-backlight.exe -noConsoleThe -noConsole flag makes the executable to be callable outside the shell without momentarily spawning a console window.