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


>> https://gallery.technet.microsoft.com/Lenovo-BIOS-Configurator-509f3fa3 <<

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.

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.

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
  • T430S
  • T440S
  • T450S
  • T460S
  • T470S
  • T480S

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.

Enjoy 🙂

10 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 🙂


Leave a Comment

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