• ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
Are you having HotKey issues? Click here for tips and tricks.
Check out our WINDOWS 11 Support Center info about: OPTIMIZATION, KNOWN ISSUES, FAQs, VIDEOS AND MORE.
HP Recommended
HP EliteBook 820 G3 Notebook PC
Microsoft Windows 10 (64-bit)

Hello,

 

we are currently trying to automate many things regarding BIOS settings by using powershell and the HP instrumentedbios WMI namespace.

 

Changing settings through a simple powershell command like this is kinda easy and works fine:

 

$BIOS = gwmi -class hp_biossettinginterface -Namespace "root\hp\instrumentedbios"
$result = $BIOS.SetBIOSSetting("NumLock on at boot", "Enable")

 

 

The issue we are running into is a password protected BIOS. Doing the same thing as above with a password parameter simply isn't working. I've already found this post (https://h30434.www3.hp.com/t5/Notebook-Operating-System-and-Recovery/Powershell-Command-to-Make-Chan...) but unfortunately it doesn't help. Using this method to encode our password and adding it as the password paremeter still results in returncode 6(="Access Denied"). It's a simple password containing lower case letters and numbers, no special signs and such.

 

$BIOS_PW = "<kbd/>" + (Convert-ToKbdString -UTF16String "OurPassword")

$BIOS = gwmi -class hp_biossettinginterface -Namespace "root\hp\instrumentedbios"
$result = $BIOS.SetBIOSSetting("NumLock on at boot", "Enable", "$BIOS_PW")

 

 

We are running into this issue on all our current devices (820/840 G3, Zbook 17, Zbook 15).

 

How am I supposed to encode/encrypt my password and add it as parameter to the SetBIOSSetting function?

 

Current BIOS version: N75 Ver 01.22 12/12/2017

 

1 ACCEPTED SOLUTION

Accepted Solutions
HP Recommended

Well, nevermind. This way it is working:

 

$Password = "<utf-16/>"+"mypassword"

$BIOS = gwmi -class hp_biossettinginterface -Namespace "root\hp\instrumentedbios"
$result = $BIOS.SetBIOSSetting("NumLock on at boot", "Enable", "$Password")

 

This results in return 0(="Success")

 

 

View solution in original post

1 REPLY 1
HP Recommended

Well, nevermind. This way it is working:

 

$Password = "<utf-16/>"+"mypassword"

$BIOS = gwmi -class hp_biossettinginterface -Namespace "root\hp\instrumentedbios"
$result = $BIOS.SetBIOSSetting("NumLock on at boot", "Enable", "$Password")

 

This results in return 0(="Success")

 

 

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.