This is the built-in help made by Microsoft for the command 'Export-Certificate', in PowerShell version 5 - as retrieved from
Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.
For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.
Exports a certificate from a certificate store into a file.
Export-Certificate [-Force] [-NoClobber] [-Type <CertType>] -Cert <Certificate> -FilePath <String> [-Confirm] [-WhatIf] [<CommonParameters>]
The Export-Certificate cmdlet exports a certificate from a certificate store to a file. The private key is not included in the export. If more than one certificate is being
exported, then the default file format is SST. Otherwise, the default format is CERT. Use the Type parameter to change the file format.
<
Online Version: http://go.microsoft.com/fwlink/p/?linkid=287526
Get-ChildItem
Import-Certificate
<
EXAMPLE 1
PS C:\>$cert = (Get-ChildItem -Path cert:\CurrentUser\My\EEDEF61D4FF6EDBAAD538BB08CCAADDC3EE28FF)
PS C:\>Export-Certificate -Cert $cert -FilePath c:\certs\user.sst -Type SST
This example exports a certificate to the file system as a Microsoft serialized certificate store without its private key.
EXAMPLE 2
PS C:\>$cert = (Get-ChildItem -Path cert:\CurrentUser\My\EEDEF61D4FF6EDBAAD538BB08CCAADDC3EE28FF)
PS C:\>Export-Certificate -Cert $cert -FilePath c:\certs\user.cer
This example exports a certificate to the file system as a DER-encoded .cer file without its private key.
EXAMPLE 3
PS C:\>$cert = ( Get-ChildItem -Path cert:\CurrentUser\My\EEDEF61D4FF6EDBAAD538BB08CCAADDC3EE28FF )
PS C:\>Export-Certificate -Cert $cert -FilePath c:\certs\user.p7b -Type p7b
This example exports a certificate to the file system as a PKCS#7-fomatted .p7b file without its private key.
EXAMPLE 4
PS C:\>Get-ChildItem -Path cert:\CurrentUser\my | Export-Certificate –FilePath c:\certs\allcerts.sst -Type SST
This example exports all certificates under CurrentUser\my store into a Microsoft serialized certificate store allcerts.sst.