The Lenovo BIOS Configurator lets you configure the BIOS of a Lenovo computer using Powershell through WMI (Windows Management Instrumentation).
The script currently supports modifying following BIOS settings:
- VirtualizationTechnology (enable/disable)
- SecureBoot (enable/disable)
- PreBootForThunderboltDevice (enable/disable)
- SecurityChip (TPM) (enable/disable)
- AMTControl (enable/disable)
- OnByAcAttach (enable/disable)
- WirelessAutoDisconnection (enable/disable)
If your Lenovo computer is protected with a supervisor password, the script allows you to use the parameter: -SupervisorPass (Note that the only supported encoding and keyboard language here is ascii,us)
The script will log its actions to C:\Windows\Config-LenovoBIOS.log (X:\Windows\Config-LenovoBIOS.log if run in WindowsPE before Windows has been installed)
- .\Config-LenovoBIOS.ps1 -EnableSecureBoot
- .\Config-LenovoBIOS.ps1 -EnableSecureBoot -EnableVirtualization -EnableTPM -DisableAMT -EnablePrebootThunderbolt
- .\Config-LenovoBIOS.ps1 -SupervisorPass christmas -EnableWirelessAutoDisconnection
You can use the script during OSD (Operating System Deployment) with Configuration Manager. Below is an example of setting the Supervisor password in a variable: SMSTSBIOSPassword and then using the variable when running the script.
N.b: It’s currently not supported to hide the value of the variable (1806 feature). I’m still working on that, as well as other improvements to when running this with Configuration Manager.
The script is an on-going process and will have additions and changes added regularly.
For now the script has been tested on following Lenovo laptops:
- X1 Yoga 2nd
- X1 Yoga 3rd
It goes without saying, but test this before using in production. The script was made for internal needs and use. Also, made for practicing Powershell and learning. There might be better “solutions” out there.