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.
11 thoughts on “Lenovo BIOS Configurator”
I gotta say, that’s a pretty nifty solution! I wrote a handful of functions to reconfigure BIOS:
– Get the existing BIOS settings, along with valid values: https://itinlegal.wordpress.com/get-lenovobiossetting/
– Set the various BIOS settings with validation: https://itinlegal.wordpress.com/set-lenovobiossetting/
– Save the configuration: https://itinlegal.wordpress.com/save-lenovobiossetting/
But I opted out of leveraging switches to toggle key functionality only because I didn’t want to have to hard code all that functionality. 🙂 This is great – thanks for sharing the fruits of your hard labor!
Thank you! Much appreciated. I am by no means any Powershell champ. I just practice and share the results. Your solutions seems to require some deeper Powershell/coding skills – good job 🙂
You’re too kind and I’m no champ either! Like yourself, I’m tinkering, practicing, and just trying to get things working in our environment. Your solution makes it really simple for anyone to follow. Thanks for taking the time to reply!
Thank you and anytime 🙂
Do you have a more up-to-date version that includes Lenovo ThinkCentre M720q devices?
I cannot find the file named Config-LenovoBIOS.ps1 at https://gallery.technet.microsoft.com/Lenovo-BIOS-Configurator-509f3fa3. Can you please forward if there is a different address? I really need this script e 🙁
Link to download PowerShell is going to general MS site.
Isn’t the script available anymore?