Export-Tpm2CACertificate Command | Vmware PowerCLI Reference

Export-Tpm2CACertificate

This cmdlet exports the CA certificate from either the certificate in the specified TPM 2.0 endorsement key or the specified certificate to a file.

Syntax

Export-Tpm2CACertificate
[ -FilePath ] < String >
-Certificate < X509Certificate2 >
[-Force ]
[-ProgressAction < ActionPreference > ]
[-RunAsync ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
FilePath String 1
Specifies the path to the file where you want to export the CA certificate.
required
Certificate X509Certificate2 named
Specifies the certificate from which you can export the CA certificate to a file.
optional Force SwitchParameter named
Indicates that the cmdlet overwrites the existing destination files and creates directories to complete the specified file path.
optional ProgressAction ActionPreference named
optional RunAsync SwitchParameter named
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter, run "help About_RunAsync" in the VMware PowerCLI console.
Export-Tpm2CACertificate
[ -FilePath ] < String >
-Tpm2EndorsementKey < Tpm2EndorsementKey >
[-Force ]
[-ProgressAction < ActionPreference > ]
[-RunAsync ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
FilePath String 1
Specifies the path to the file where you want to export the CA certificate.
required
Tpm2EndorsementKey Tpm2EndorsementKey named
  • pipeline
Specifies the TPM 2.0 endorsement key that you can use to retrieve the CA certificate.
optional Force SwitchParameter named
Indicates that the cmdlet overwrites the existing destination files and creates directories to complete the specified file path.
optional ProgressAction ActionPreference named
optional RunAsync SwitchParameter named
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter, run "help About_RunAsync" in the VMware PowerCLI console.

Output

System.IO.FileInfo

Examples

Example 1

$tpm2Ek = Get-Tpm2Endorsementkey -VMHost myHost
Export-Tpm2CACertificate -Tpm2EndorsementKey $tpm2Ek -FilePath c:\myfile.zip

Exports the CA certificate from the certificate in the $tpm2EK TPM 2.0 endorsement key that you can retrieve from the myHost host to the c:\myfile.zip file.

Example 2

$tpm2Ek = Get-Tpm2Endorsementkey -VMHost myHost
Export-Tpm2CACertificate -Certificate $tpm2Ek.Certificate -FilePath c:\myfile.zip

Exports the CA certificate from the specified $tpm2EK.Certificate certificate to the c:\myfile.zip file.

Related Commands

Tpm2CACertificate

This cmdlet exports the CA certificate from either the certificate in the specified TPM 2.0 endorsement key or the specified certificate to a file.

Tpm2EndorsementKey

This cmdlet exports the TPM 2.0 endorsement key from the TPM 2.0 chip in the specified host. It only works when you connect to the specified host directly by using the Connect-VIServer cmdlet.

This cmdlet retrieves the TPM 2.0 endorsement key from the TPM 2.0 chip in the specified host. You can use this cmdlet by connecting either directly to an ESXi host or to its vCenter Server system.