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

[-FilePath]  <String>
-Tpm2EndorsementKey  <Tpm2EndorsementKey>
[-Force]
[-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
    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.

    [-FilePath]  <String>
    -Certificate  <X509Certificate2>
    [-Force]
    [-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
    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

    Feedback

    Was this page helpful?