Refer to Get-Certificate
I tried to request a certificate using PowerShell, it worked but the certificate is not exportable, here is my command:
Get-Certificate -Template "MyComputer" -SubjectName "CN=corey.com" -CertStoreLocation cert:\LocalMachine\My
When I try to export the certificate, it failed.
Export-PfxCertificate -Cert cert:\LocalMachine\My\$Thumbprint -FilePath C:\corey.com.pfx -Password $mypwd
The error message:
Export-PfxCertificate: Cannot export non-exportable private key.
I can't find any parameter like Exportable
or property for me to use with Get-Certificate
command. Is there any way to request/make a certificate exportable by using PowerShell?