You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 16, 2021. It is now read-only.
Installed WindowsCompatibility module and imported PKI module.
Created certificate as follows: $cert = New-SelfSignedCertificate -Subject 'test' -KeyExportPolicy Exportable -CertStoreLocation Cert:\CurrentUser\My
When exporting (and yes $pw is a securestring) I get an error that the key is not exportable:
`Export-PfxCertificate -Cert $cert -Password $pw -FilePath c:\temp\test.pfx
Cannot export non-exportable private key.
If I retrieve the cert by thumbprint in PS 5 and then export, it works fine:
`$cert = ls 'Cert:\CurrentUser\My\FD5D219C9245E09C4EFA72110E6C03997C3CDC76'
Export-PfxCertificate -Cert $cert -Password $pw -FilePath c:\temp\test.pfx