cancel
Showing results for 
Search instead for 
Did you mean: 
DJC86
Level 1
2 1 1 0
Message 1 of 2
5,784
Flag Post

Solved!

Set BIOS Password Using SetBiosSetting() Method

HP Recommended

Hello,

 

I am attempting to set a BIOS password on my machines using the HPBIOSSettingInterface WMI Object.  My question is do newer models of HP PCs support using the SetBIOSSetting() method to set a BIOS password on a workstation?

 

When I attempt to use the method, it keeps returning code "5", meaning "invalid parameter"

 

Here is the code I am attempting to run in PowerShell

 

$BIOS = Get-WMIObject HP_BIOSSettingInterface -Namespace "root\HP\InstrumentedBIOS"

$BIOS.SetBIOSSetting('Setup Password','<utf-16/>TheBIOSPassword','')

 

Is the above able to be used by all HP workstations?

 

Thank you,

Daniel

1 ACCEPTED SOLUTION

Accepted Solutions
DJC86
Author
Level 1
2 1 1 0
Message 2 of 2
Flag Post
HP Recommended

Nevermind - I found the problem:

 

I needed to include the encoding even though there isn't a password established.

 

So, instead of using this:

$BIOS.SetBIOSSetting('Setup Password','<utf-16/>TheBIOSPassword','')

 

I used this and it worked:

$BIOS.SetBIOSSetting('Setup Password','<utf-16/>TheBIOSPassword','<utf-16/>')

 

Hope this helps someone out in the future.

 

Thanks,

Daniel

View solution in original post

0 Kudos
1 REPLY 1
DJC86
Author
Level 1
2 1 1 0
Message 2 of 2
Flag Post
HP Recommended

Nevermind - I found the problem:

 

I needed to include the encoding even though there isn't a password established.

 

So, instead of using this:

$BIOS.SetBIOSSetting('Setup Password','<utf-16/>TheBIOSPassword','')

 

I used this and it worked:

$BIOS.SetBIOSSetting('Setup Password','<utf-16/>TheBIOSPassword','<utf-16/>')

 

Hope this helps someone out in the future.

 

Thanks,

Daniel

View solution in original post

0 Kudos
Warning Be alert for scammers posting fake support phone numbers and/or email addresses on the community. If you think you have received a fake HP Support message, please report it to us by clicking on "Flag Post".
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation