List and change BIOS settings with PowerShell
https://www.systanddeploy.com/2019/03/list-and-change-bios-settings-with.html?m=1
In this post I will show you how to list and change BIOS settings for HP, Dell and Lenovo with PowerShell only.
In my previous posts, I did some tools and module to list, export and change BIOS settings for local and remote computers and many manufacturers.
I will now show you how to manage BIOS settings with PowerShell only:
- List settings
- Change settings without BIOS password
- Change settings with BIOS password configured
- Change settings from a CSV file that contains settings to change
I say only, because there are some tools available to manage BIOS with PowerShell. For instance for HP, there is a utility called BCU.
As I don't want any other tools to manage BIOS I just used PowerShell.
List BIOS Settings
For HP
To get BIOS settings the WMI query to use is the below one:
You can get for instance settings name, current value and also available values, as below:
# settings name, current value and also available values In my tool and modules I used the below function:
For DELL
A module is available to list BIOS settings,
To use it and list name, current value, available values you can use the function below:
To list specific values proceed as below:
For LENOVO
To get BIOS settings the WMI query to sue is the below one:
You can get for instance settings name, current value and also available values, as below:
In my tool and modules I used the below function:
Change BIOS settings
For HP
The first step will be to check if a BIOS password is configured.
For that use the below query:
To change settings without BIOS password proceed as below:
To change settings with a BIOS password proceed as below:
To change a list of settings for instance from a CSV file.
To check if settings have been correctly changed, proceed as below:
See below return code and here the full doc.
My CSV contain all setings to change an new values, as below:
For LENOVO
The first step will be to check if a BIOS password is configured.
For that use the below query:
To change settings without BIOS password proceed as below:
To change settings with a BIOS password proceed as below:
To change a list of settings for instance from a CSV file.
To check if settings have been correctly changed, proceed as below:
See below return code and here the full doc.
For DELL
The first step will be to check if a BIOS password is configured.
For that use the below query:
To change a Dell BIOS setting you have to know what is the category of the setting you want to change.
To resume the category is the part where is located your setting, for instance which Tab.
For example, settings FnLock and NumLock are located in the Category POSTBehavior.
To set it proceed as below:
To change settings without BIOS password proceed as below:
To change settings with a BIOS password proceed as below:
To change a list of settings for instance from a CSV file.
My CSV contain all setings to change an nexw values, as below.
Hello,
RépondreSupprimerWhere is the CSV file for Dell?
Thank you
Hello, Thanks for this great post. It's a time saver! :)
RépondreSupprimerFYI, in the Get_HP_BIOS_Settings function, there's a small mistake.
"select-object Setting, Value, possiblevalues" should be replaced by "select-object Setting, Value, Available_Values"
Hello,
RépondreSupprimervery nice. Is it Possible to set a Lenovo Bios password via Powershell, when it is not Konfigured?
Thanks for sharing thiss
RépondreSupprimer