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)
- ThunderboltAccess (enable/disable)
- SecurityChip (TPM) (enable/disable)
- AMTControl (enable/disable)
- OnByAcAttach (enable/disable)
- WirelessAutoDisconnection (enable/disable)
- SetSupervisorPass <InsertYourSupervisorPassword>
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 -EnableThunderboltAccess -SupervisorPass %SMSTSBIOSPassword%t
- .\Config-LenovoBIOS.ps1 -SupervisorPass christmas -EnableWirelessAutoDisconnection
- .\Config-LenovoBIOS.ps1 -SetSupervisorPass %SMSTSBIOSPassword%
>> Lenovo-BIOS-Configurator/Config-LenovoBIOS.ps1 at main · imabdk/Lenovo-BIOS-Configurator (github.com) <<
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.
Setting the Supervisor password in a task sequence variable
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
IMPORTANT: It goes without saying, but test this before using in production. Use at your own risk. The script was made for internal needs and use, as well as for practice and learning. If forgetting the supervisor password, or unintentionally setting it to something unknown, replacing the motherboard is the only official and supported approach to resetting the password.