Summary
Retrieves the contents of an x509 Platform Certificate
Syntax
Get-HPPlatformCertificateData -UseLocalPlatformCertificate [<CommonParameters>]
Get-HPPlatformCertificateData -PlatformCertificate <String> [<CommonParameters>]
Get-HPPlatformCertificateData -UseOssIntegration [-Url <String>] [-ClientId <String>] [-ClientSecret <String>] [<CommonParameters>]
Description
This command retrieves the contents of an x509 Platform Certificate according to the TCG Platform Certificate Profile, version 1.1 Revision 19. The output is an object convertible to Json.
Parameters
| Name | Argument | Description |
|---|---|---|
| PlatformCertificate | <String> | Specifies the path to either a platform certificate file, a directory containing platform certificates, or a zip file containing platform certificates that are stored offline either locally in the PC or in a shared location. If the platform certificate belongs to the PC, the tool installs platform certificate in the local PC in both EFI system partition and UEFI variable. When providing a folder or a zip file, the tool will search for the certificate file named in the following format: HPInc.<serial_number>.BASE.cer |
| UseLocalPlatformCertificate | <SwitchParameter> | If specified, this command uses the Platform Certificate that is stored locally in the PC. The default locations for the certificate are the EFI System Partition /boot/tcg/cert/platform/ or \efi\tcg\cert\platform and UEFI Variable HpPlatformCertificateBase GUID {B44ED025-A047-4312-9E62-A1C3ACC8684D} |
| UseOssIntegration | <SwitchParameter> | If specified, this command uses the OSS (Order Status Service) API integration to retrieve the platform certificate. When this option is used, the tool can automatically prompt for OSS API credentials (client ID and client secret) and retrieve the platform certificate for the current device from the OSS system. Optional connection details can be supplied with `-Url`, `-ClientId`, and `-ClientSecret`. This option requires network connectivity and valid OSS API credentials. |
| Url | <String> | Specifies a custom OSS API endpoint URL for integration operations. This parameter is optional and can be used with the -UseOssIntegration parameter to override the default OSS API endpoint. If not specified, the tool uses the default production OSS API endpoint. |
| ClientId | <String> | Specifies the OSS integration client identifier used to authenticate when `-UseOssIntegration` is provided. If omitted, the cmdlet first prompts the user to enter the client ID interactively before asking for the client secret. |
| ClientSecret | <String> | Specifies the OSS integration client secret used together with `-ClientId` when `-UseOssIntegration` is enabled. Provide this value when using custom OSS credentials or automation scenarios. When not supplied, the cmdlet securely prompts for the secret immediately after the client ID prompt. |
Examples
PS C:\> Get-HPPlatformCertificateData -UseLocalPlatformCertificate
PS C:\> Get-HPPlatformCertificateData -PlatformCertificate C:\Users\Tools\Test\HPInc.SCN3315BDN.BASE.cer
PS C:\> Get-HPPlatformCertificateData -PlatformCertificate C:\Users\Tools\Test\
PS C:\> Get-HPPlatformCertificateData -UseLocalPlatformCertificate | ConvertTo-Json -Depth 8
PS C:\> Get-HPPlatformCertificateData -PlatformCertificate C:\Users\Tools\Test\Certificates.zip
PS C:\> Get-HPPlatformCertificateData -UseOssIntegration
PS C:\> Get-HPPlatformCertificateData -UseOssIntegration -Url "https://custom-oss-api.example.com/api/v1/platformCerts" -ClientId "your-client-id" -ClientSecret "your-client-secret"
PS C:\> Get-HPPlatformCertificateData -UseOssIntegration -Url "https://custom-oss-api.example.com/api/v1/platformCerts"
PS C:\> Get-HPPlatformCertificateData -UseOssIntegration -ClientId "your-client-id" -ClientSecret "your-client-secret"
Notes
- This cmdlet requires the platform certificate to be in x509 format following TCG Platform Certificate Profile, version 1.1 Revision 19
- When using -UseLocalPlatformCertificate, the certificate must be installed in the EFI System Partition or UEFI variable
- The output object can be converted to JSON using ConvertTo-Json for easier viewing and processing
- When using -UseOssIntegration, network connectivity and valid OSS API credentials are required
- The tool can automatically install platform certificates when provided via -PlatformCertificate parameter