Change BIOS Settings using PowerShell

email me

So, to change a BIOS setting, find the setting and values, and modify using this PowerShell. In my case, I wanted to disable the USB Storage Boot from autobooting to external USB drives.

$s = gwmi -class hp_biossettinginterface -Namespace "root\hp\instrumentedbios"
$s.SetBIOSSetting('USB Storage Boot','Disable')


* Note, if the ‘Return’ is 0, it worked.