• ×
    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
HP Recommended
hp z220
Microsoft Windows 10 (64-bit)

  $comp = 'in4412250'

 $BIOS = Get-WMIObject HP_BIOSSettingInterface -Namespace "root\HP\InstrumentedBIOS" -cn $comp
# 111111 - old password
# bjc[g - new password
$BIOS.SetBIOSSetting('Setup Password','<utf-16/>,bjc[g','<utf-16/>,111111') # work! ?????
__GENUS : 2
__CLASS : __PARAMETERS
__SUPERCLASS :
__DYNASTY : __PARAMETERS
__RELPATH :
__PROPERTY_COUNT : 1
__DERIVATION : {}
__SERVER :
__NAMESPACE :
__PATH :
Return : 6
PSComputerName :
# Return : 6 -  what does it mean?
 
# another case
 
$comp
in4412250
PS C:\data\inv> if (gwmi HP_BIOSPassword -cn $comp -Namespace "root\HP\InstrumentedBIOS" -Filter "Name = 'Setup Password' AND IsSet = 1") {"setup password set on $comp"} else {"setup password not set on $comp"}
setup password not set on in4412250
PS C:\data\inv> $BIOS = Get-WMIObject HP_BIOSSettingInterface -Namespace "root\HP\InstrumentedBIOS" -cn $comp
PS C:\data\inv> $BIOS

__GENUS : 2
__CLASS : HPBIOS_BIOSSettingInterface
__SUPERCLASS : HP_BIOSSettingInterface
__DYNASTY : HP_BIOSSettingInterface
__RELPATH : HPBIOS_BIOSSettingInterface.InstanceName="ACPI\\PNP0C14\\0_0"
__PROPERTY_COUNT : 2
__DERIVATION : {HP_BIOSSettingInterface}
__SERVER : IN4412250
__NAMESPACE : root\HP\InstrumentedBIOS
__PATH : \\IN4412250\root\HP\InstrumentedBIOS:HPBIOS_BIOSSettingInterface.InstanceName="ACPI\\PNP0C14\\0_0"
Active : True
InstanceName : ACPI\PNP0C14\0_0
PSComputerName : IN4412250

PS C:\data\inv> $BIOS.SetBIOSSetting('Setup Password','<utf-16/>,bjc[g','<utf-16/>') # Z220,Z230
 
__GENUS : 2
__CLASS : __PARAMETERS
__SUPERCLASS :
__DYNASTY : __PARAMETERS
__RELPATH :
__PROPERTY_COUNT : 1
__DERIVATION : {}
__SERVER :
__NAMESPACE :
__PATH :
Return : 0
PSComputerName :
# it works
3 REPLIES 3
HP Recommended

Hi

Can you give a powershell command that would return the current password?

 

http://support.moonpoint.com/os/windows/PowerShell/win32_bios.php

 

 

HP Recommended

I haven't this commands in powershell. But I need it.

HP Recommended

Hi

 

This is a dangerous subject area and I have sent a link via Private Message to avoid anyone else bricking a machine through trying to change/reset a password and making a typo.

† 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>.