Set-HPBIOSSetupPassword



Summary

Set the BIOS Setup password

Syntax

Set-HPBIOSSetupPassword [-NewPassword] <String> [[-Password] <String>] [[-ComputerName] <String>] [<CommonParameters>]

Set-HPBIOSSetupPassword [-NewPassword] <String> [[-Password] <String>] [-CimSession] <CimSession> [<CommonParameters>]

Description

Set the BIOS Setup password to the specific value. The password must comply with the current active security policy.

Parameters

Name Argument Description
NewPassword <String> The new password to set. A value is required. To clear the password, use Clear-HPBIOSSetupPassword
Password <String> The existing setup password, if any. If there is no password set, this parameter may be omitted. Use Get-HPBIOSSetupPasswordIsSet to determine if a password is currently set.
ComputerName <String> Execute the command on specified target computer. If not specified, the command is executed on the local computer.
CimSession <CimSession> A pre-established CIM Session (as created by New-CIMSession cmdlet). Use this to pass a preconfigured session object to optimize remote connections or specify the connection protocol (Wsman or DCOM). If not specified, the function will create its own one-time use CIM Session object, and default to DCOM protocol.

Notes

  • Requires HP BIOS.
  • Use single quotes around the password to prevent PowerShell from interpreting special characters in the string.
  • Multiple attempts to change the password with an incorrect existing password may trigger BIOS lockout mode, which can be cleared by rebooting the system.

Examples


PS C:\> Set-HPBIOSSetupPassword -NewPassword 'newpw' -Password 'oldpw'

See also