Format-SecureBootUEFI
Format-SecureBootUEFI
Formats certificates or hashes into a content object that is returned and creates a file that is ready to be signed.
Sintaxis
Parameter Set: __AllParameterSets
Format-SecureBootUEFI -Name <String> [-SignableFilePath <String> ] [-Time <String> ] [ <CommonParameters>]
Parameter Set: FormatForCertificates
Format-SecureBootUEFI -CertificateFilePath <String[]> -SignatureOwner <Guid> [-AppendWrite] [-ContentFilePath <String> ] [-FormatWithCert] [ <CommonParameters>]
Parameter Set: FormatForDelete
Format-SecureBootUEFI -Delete [ <CommonParameters>]
Parameter Set: FormatForHashes
Format-SecureBootUEFI -Algorithm <String> -Hash <String[]> -SignatureOwner <Guid> [-AppendWrite] [-ContentFilePath <String> ] [ <CommonParameters>]
Descripción detallada
The Format-SecureBootUEFI cmdlet receives certificates or hashes as input and formats the input into a content object that is returned. This returned object will be used by the Set-SecureBootUEFI cmdlet for actually updating the variable. If a signable file is specified, then this cmdlet creates a file with the specified name that needs to be signed.
This cmdlet will run on both UEFI and BIOS (non-UEFI) computers.
Parámetros
-Algorithm<String>
Specifies, if this cmdlet is formatting hashes, which algorithm is being used. Los valores aceptables para este parámetro son los siguientes: SHA1, SHA256, SHA384, or SHA512.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-AppendWrite
Indicates that the contents of the current variable is appended instead of overwritten.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
false |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-CertificateFilePath<String[]>
Specifies a list of one or more files each containing a certificate that is used to generate the content object.
If only the name is specified, then the file must be in the current working directory; otherwise the full path of the file must be specified.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-ContentFilePath<String>
Specifies the name of the file that is created and contains the information for the content object that is generated by this cmdlet.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Delete
Indicates that the content object, as well as the appropriate sign-able file, is created that deletes the variable.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
False |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-FormatWithCert
Indicates whether the certificate will be stored or just the public key. If this parameter is set, then the entire certificate is stored in the content object.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
false |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Hash<String[]>
Specifies a list of hashes that are used to generate the content.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Name<String>
Specifies the name of the UEFI environment variable. Los valores aceptables para este parámetro son los siguientes: PK, KEK, DB, or DBX.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue) |
¿Aceptar caracteres comodín? |
false |
-SignableFilePath<String>
Specifies the file that contains the contents of the data that is ready to be signed.
If only the name is specified, then the file must be in the current working directory; otherwise the full path of the file must be specified.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-SignatureOwner<Guid>
Specifies the GUID of the signature owner.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Time<String>
Specifies the timestamp that is used in the signature. This parameter value should be formatted as follows so that it will be accepted by the DateTime object. "2011-11-01T13:30:00Z"
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
System.String
The String object represents the UEFI variable name that may be output from the Get-SecureBootUEFI cmdlet.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
Microsoft.SecureBoot.Commands.UEFIFormattedVariable
The UEFIFormattedVariable object contains information about the package that is built up to be set. The following members are part of the UEFIFormattedVariable object.
-- A string named Name.
-- A string named Time.
-- A boolean named AppendWrite.
-- An array of bytes named Content.
The UEFIFormattedVariable object can be used to pipe into the Set-SecureBootUEFIcmdlet.
Ejemplos
EXAMPLE 1
This example formats the private key in PK.cer being piped into the Set-SecureBootUEFI cmdlet.
PS C:\> Format-SecureBootUefi -Name PK -SignatureOwner 12345678-1234-1234-1234-123456789abc -CertificateFilePath PK.cer -SignableFilePath GeneratedFileToSign.bin -Time 2011-11-01T13:30:00Z | Format-List
EXAMPLE 2
This example formats the hash being appended to the DBX UEFI variable when piped into the Set-SecureBootUEFI cmdlet.
PS C:\> Format-SecureBootUEFI -Name DBX -SignatureOwner 12345678-1234-1234-1234-123456789abc -Algorithm SHA256 -Hash 0011223344556677889900112233445566778899001122334455667788990011 -SignableFilePath GeneratedFileToSign.bin -Time 2011-11-01T13:30:00Z -AppendWrite | Format-List
EXAMPLE 3
This example formats the KEK UEFI variable being deleted when piped into the Set-SecureBootUEFI cmdlet.
PS C:\> Format-SecureBootUEFI -Name KEK -Delete -SignableFilePath GeneratedFileToSign.bin -Time 2011-11-01T13:30:00Z | Format-List