'Export-PfxCertificate not recognized in Windows 10

Good morning, afternoon or evening.

I had some problems with this command. Basically I'm trying to export a .cer certificate as a .pfx one, but for some reason the command to make the export doesn't work.

The error message I get is this one:

The term 'Export-PfxCertificate' is not recognize as a name of a cmdlet, funtion, script archive or program executable.

I run the command I found in this post: https://superuser.com/questions/1098614/how-can-i-export-a-certificate-from-mmc-as-a-pfx-file

And is this one:

Export-PfxCertificate -Cert .\LONGSTRINGOFHEX -FilePath 'C:\path\to\outfile.pfx' -Password (ConvertTo-SecureString -String 'password' -AsPlainText -Force)

Thanks for your help.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source