Get-HPUEFIVariable



Summary

Read a UEFI variable value.

Syntax

Get-HPUEFIVariable [-Name] <String> [-Namespace] <String> [[-AsString]] [<CommonParameters>]

Description

This function reads the value of a UEFI variable.

Parameters

Name Argument Description
Name <String> The name of the UEFI variable to read
Namespace <String> Look for the variable in the specified custom namespace. The namespace must be in the format of a UUID, surrounded by curly brackets.
AsString Return the value as a string rather than a byte array. Note that the functions 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 functions 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 function is not supported on legacy mode, only on UEFI mode.
  • This function 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

See also