Summary
Creates a QR-Code for transferring the private key from a certificate file to the HP Sure Admin phone app
Syntax
Convert-HPSureAdminCertToQRCode [-LocalAccessKeyFile] <FileInfo> [[-LocalAccessKeyPassword] <String>] [[-Model] <String>] [[-SerialNumber] <String>] [[-OutputFile] <FileInfo>] [[-Format] <String>] [[-ViewAs] <String>] [[-Passphrase] <String>] [<CommonParameters>]
Description
This command extracts a private key from the provided certificate file and presents it in a form of QR-Code, which can be scanned with the HP Sure Admin phone app. Once scanned the app can be used for authorizing commands and BIOS setting changes.
Security note: It is recommended to delete the QR-Code file once it is scanned with the app. Keeping the QR-Code stored locally in your computer is not a recommended production pattern since it contains sensitive information that can be used to authorize commands.
Parameters
Name | Argument | Description |
---|---|---|
LocalAccessKeyFile | <FileInfo> | Specifies the path to the local access key as a PFX file. If the PFX file is protected by a password (recommended), the LocalAccessKeyPassword parameter should also be provided. |
LocalAccessKeyPassword | <String> | Specifies the local access key file password, if required. |
Model | <String> | Specifies the computer model to be stored with the key in the phone app |
SerialNumber | <String> | Specifies the serial number to be stored with the key in the phone app |
OutputFile | <FileInfo> | Specifies the file to write output to instead of writing the output to the pipeline |
Format | <String> | Specifies the format of your preference to save the QR-Code image file: Jpeg, Bmp, Png, Svg. |
ViewAs | <String> | Specifies the view option. The possible values are: - Default: creates a local file in your system and opens QR-Code image in default image viewer. - Text: the QR-Code is displayed by using text characters in your console. - None: the QR-Code is not presented to the user. This option is ideally used with the OutputFile parameter. |
Passphrase | <String> | Specifies the password to protect QR-Code content |
Notes
- Supported on Windows Power Shell v5.
- An HP BIOS with HP Sure Admin support is required for applying the payloads generated by this command.
Examples
PS C:\> Convert-HPSureAdminCertToQRCode -LocalAccessKeyFile "$path\signing_key.pfx"
PS C:\> Convert-HPSureAdminCertToQRCode -Model "PC-Model" -SerialNumber "SN-1234" -LocalAccessKeyFile "$path\signing_key.pfx" -LocalAccessKeyPassword "s3cr3t"
PS C:\> Convert-HPSureAdminCertToQRCode -Model "PC-Model" -SerialNumber "SN-1234" -LocalAccessKeyFile "$path\signing_key.pfx" -Passphrase "s3cr3t" -ViewAs Text
PS C:\> Convert-HPSureAdminCertToQRCode -LocalAccessKeyFile "$path\signing_key.pfx" -Passphrase "s3cr3t" -Format "Svg"