Summary
Retrieves a UEFI variable value
Syntax
Get-HPUEFIVariable [-Name] <String> [-Namespace] <String> [[-AsString]] [<CommonParameters>]
Description
This command retrieves the value of a UEFI variable.
Parameters
Name | Argument | Description |
---|---|---|
Name | <String> | Specifies the name of the UEFI variable to read |
Namespace | <String> | Specifies a custom namespace. The namespace must be in the format of a UUID, surrounded by curly brackets. |
AsString | If specified, this command will return the value as a string rather than a byte array. Note that the commands in this library support UTF-8 compatible strings. Other applications may store strings that are not compatible with this translation, in which case the caller should retrieve the value as an array (default) and post-process it as needed. |
Notes
- The process calling these commands must be able to acquire 'SeSystemEnvironmentPrivilege' privileges for the operation to succeed. For more information, refer to "Modify firmware environment values" in the linked documentation below.
- This command is not supported on legacy mode, only on UEFI mode.
- This command requires elevated privileges.
Examples
PS C:\> PS>Get-HPUEFIVariable -GlobalNamespace -Name MyVariable
PS C:\> PS>Get-HPUEFIVariable -Namespace "{21969aa8-681f-46be-90f0-6019ce9b0ee7}" -Name MyVariable