PowerShell and WMI to modify BIOS settings
- Log in to post comments
I am trying to set the BIOS power-on password for HP using PowerShell /WMI. By going through the HP Client Management Interface technical white paper from HP, which describes the class and method to accomplish this task, and research. I came to know about the following command. I have set the setup password successfully. but unable to set power-on password.
$Interface = Get-WmiObject -Namespace root/hp/InstrumentedBIOS -Class HP_BIOSSettingInterface $Interface.SetBIOSSetting("Power-on Password","<utf-16/>" + "pass","<utf-16/>" + "pass")
The command runs successfully, however, it displays the return code 1.
if I execute the following command
Get-WmiObject -Namespace root/hp/InstrumentedBIOS -Class HP_BIOSSetting
power-on password does not exist at all, why is this option not present in my system?
my system bios version/date: AMI F.O7, 23-04-2019
BIOS Mode : UEFI
BaseBoard version: MVB, A
SMBIOS version: 3.2
System Model : HP Desktop Pro G2
System Type: X64-based PC
I have tried the HPCMSL module too, while setting the power-on password it showing not supported but working fine for setting and changing the Setup password.
The script you show usually works on an HP in-house BIOS. The system you have has an AMI (not-HP) bios, as you see from the bios version. I am not sure whether that BIOS implements all HP BIOS settings, or any, for that matter.
System with AMI bios are usually out of scope for our forum and tools.
It was confirmed with the BIOS team that the AMI BIOS does not support the WMI power-on password.