Syntax
Export-Tpm2CACertificate [-Certificate] <X509Certificate2> [-FilePath] <String> [-Force] [-RunAsync] [<CommonParameters>]Related Commands
Online VersionDetailed Description
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.Parameters
Return Type
System.IO.FileInfoNotes
This cmdlet does not work well on macOS. For more information, see https://github.com/dotnet/corefx/issues/41775#issuecomment-542035240.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.