PowerShell and WMI to modify BIOS settings

worky cookie 1 Reputation point
2023-01-09T12:31:31.94+00:00

Hello everyone,

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 following output with the return code 1

__GENUS : 2
__CLASS : __PARAMETERS
__SUPERCLASS :
__DYNASTY : __PARAMETERS
__RELPATH :
__PROPERTY_COUNT : 1
__DERIVATION : {}
__SERVER :
__NAMESPACE :
__PATH :
Return : 1
PSComputerName :

Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. DaveK 1,871 Reputation points
    2023-01-10T09:21:32.91+00:00

    Hi,

    Its not something I'm familiar with from using it myself but a quick google suggests that a return code 1 is for 'Not Supported'. If you enter the BIOS manually is there an option to set the Power-On Password?

    Might be worth a quick look here: https://www.configjon.com/hp-bios-password-management/

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.