Using PowerShell to View and Change BIOS Settings

You can use PowerShell to view or change BIOS settings in your laptop operating Windows. Let’s take into account some examples you need to use to get or modify some BIOS settings with PowerShell via the WMI courses (Windows Management Instrumentation) on the computer systems of standard distributors: HP, Lenovo, Dell.

You can view primary BIOS parameters in your laptop utilizing the Get-WmiObject cmdlet from the Win32_BIOS class:

Get-WmiObject -Class Win32_BIOS | Format-List *

This command permits you to view your BIOS model (SMBIOSBIOSVersion, BIOSVersion), producer, laptop serial quantity, the ReleaseDate and another info.

Get-WmiObject Win32_BIOS

You can listing solely a few of these BIOS parameters:

Get-WmiObject -Class Win32_BIOS | Select-Object Manufacturer, SMBIOSBIOSVersion

You can use the Win32_BIOS class to view some BIOS info on any laptop operating Windows. However, some distributors present particular WMI courses to direct entry BIOS from Windows OS (the native drivers by your producer should be put in on a pc).

Lenovo BIOS Settings Management from PowerShell

You can get the listing of BIOS parameters and their values on Lenovo computer systems like this:

Get-WmiObject -class Lenovo_BiosSetting -namespace rootwmi

To show solely the names of BIOS settings and their present values:

Get-WmiObject -class Lenovo_BiosSetting -namespace rootwmi | select-object OccasionName, currentsetting

list all Lenovo_BiosSetting using powershell

Let’s verify if the password to entry BIOS is ready in your Lenovo laptop:

(gwmi -Class Lenovo_BiosPasswordSettings -Namespace rootwmi).PasswordState

If the command returned zero, then the password to enter BIOS is just not set.

powershell Lenovo_BiosPasswordSettings

You can change some BIOS parameters on Lenovo computer systems. For instance, let’s allow WOL (Wake-On-LAN):

$getLenovoBIOS = gwmi -class Lenovo_SetBiosSetting -namespace rootwmi
$SaveLenovoBIOS = (gwmi -class Lenovo_SaveBiosSettings -namespace rootwmi)

Change BIOS Setting from PowerShell on Hewlett-Packard Computers

To get BIOS settings, their values and obtainable choices on HP computer systems, you need to use the next command:

Get-WmiObject -Namespace root/hp/instrumentedBIOS -Class hp_biosEnumeration | choose Name, worth, possiblevalues –AutoSize

You can change some BIOS settings on HP computer systems from PowerShell. For instance, you need to disable booting your laptop from USB gadgets.

$getHPBios = gwmi -class hp_biossettinginterface -Namespace "roothpinstrumentedbios"
$getHPBios.SetBIOSSetting('USB Storage Boot','Disable')

If a password is required to change BIOS settings, you need to use this script:

$HPBIOSPassword = ""+"Passw0rd!1"
$getHPBios = gwmi -class hp_biossettinginterface -Namespace "roothpinstrumentedbios"
$getHPBios.SetBIOSSetting(‘Network (PXE) Boot','Disable',$HPBIOSPassword)

If the final command has returned “zero”, it has been executed efficiently. You can use a easy PowerShell handler:

$ChangeBIOS_State = $bios.setbiossetting(Network (PXE) Boot', 'Disable' , $HPBIOSPassword)
$ChangeBIOS_State_Code = $ChangeBIOS_State.return
If(($ChangeBIOS_State_Code) -eq zero)


If you need to allow LAN/WLAN Switching in BIOS on an HP laptop computer to , run this command:

$getHPBios.SetBIOSSetting('LAN/WLAN Switching','Enable')

Configuring DELL BIOS Settings with PowerShell

To view and handle BIOS settings on DELL computer systems, you need to use the DCIM-BIOSService WMI class or the extra trendy rootdellomci class (obtainable after the set up of the OMCI package deal — Open Manage Client Instrumentation).

To view the boot system order in BIOS on Dell computer systems, run the next command:

Get-WmiObject -NameArea rootdellomci Dell_BootDeviceSequence | kind bootorder | choose BootMachineName, BootOrder

dellomci class to view and change bios setting on dell computers with powershell

For instance, you may allow Wake on LAN in BIOS like that:

(Get-WmiObject DCIM-BIOSService -namespace rootdcimsysman).SetBIOSAttributes($null,$null,"Wake-On-LAN","four")

Also, Dell launched a separate PowerShell module, DellBIOSProvider, which is put in alongside driver set up or you may set up it manually with this command:

Install-Module -Name DellBIOSProvider -Force

You can use this module to view the boot sequence on a Dell laptop:

Get-Little oneItem DellSmbios:BootSequenceBootsequence

To change a particular BIOS setting, use the Set-Item cmdlet. For instance, to change the BIOS password:

Set-Item -Path DellsmbiosSecurityAdminPassword –Value UnhealthyDellPa$$ –Password [email protected]

Using the strategies described above, you may create a PowerShell script to export the present BIOS settings from a reference laptop (e. g., to a CSV file). Then, you need to use PowerShell to deploy the identical BIOS settings on all computer systems in your organization.

Check Also

How to Remove Built-in Apps, Features & Editions from a Windows 10 Install Image…

In this information we’ll present how to take away Microsoft Store provisioned apps, options (capabilities), …

Leave a Reply

Your email address will not be published. Required fields are marked *