The Certificates snap-in really doesn't like to export PFX certificates, but PowerShell is happy to. You can use the Export-PfxCertificate cmdlet.
- Go to the certificates pseudo-drive by typing
cd cert:\ at the PowerShell prompt.
- Type
cd CurrentUser or cd LocalMachine as appropriate for where the certificate is. You may need to launch PowerShell as admin to export a machine certificate.
cd into the appropriate store (a dir may help). The Personal store in MMC is called My here.
- Use
dir to identify which ID corresponds to the certificate you want.
Type this command to export it as a PFX with a password:
Export-PfxCertificate -Cert .\LONGSTRINGOFHEX -FilePath 'C:\path\to\outfile.pfx' -Password (ConvertTo-SecureString -String 'password' -AsPlainText -Force)
LONGSTRINGOFHEX should be replaced with your certificate's ID. Fortunately, you can use tab completion on that.
Once that command executes, you have a PFX certificate protected with the password you supplied. PowerShell refuses to export the certificate's private key without a password, and the password can't be blank. Nevertheless, your PFX is out.
cert:in PS I get "The term 'cert:' is not recognized as the name of a cmdlet, function, script file, or operable program." Windows 10 of course. – soapergem Jul 11 '16 at 19:55cd cert:\instead. – Ben N Jul 11 '16 at 20:04Also, when importing your certificate, look for a checkbox that allows you to mark the private key as exportable. That should give you the ability to export it via MMC.
– Jul 13 '16 at 08:00certmgr.msc, double-clicking the certificate, and going to the Details tab. – Ben N Jul 30 '19 at 23:24