Lenovo BIOS Configurator


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) <<

Configuration Manager

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

Using the task sequence variable containing the supervisor password
Using the script to configure the Lenovo BIOS

More info

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
  • X230
  • X240
  • X250
  • X260
  • X270
  • X280
  • X290
  • T430S
  • T440S
  • T450S
  • T460S
  • T470S
  • T480S
  • T490S
  • T14S

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.

12 thoughts on “Lenovo BIOS Configurator”

  1. 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 🙂

  2. hi ,
    we can user dynamic password on this config? SetSupervisorPass
    “InsertYourSupervisorPassword” variable: we can use some powershell/script can get model/serial? can help me how to do it?


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.