I have a known-good PFX file, with the correct password. I can import it using the windows certificate UI, or the import-pfxcertificate cmdlet. However, get-pfxcertificate fails. Any ideas?
PS > $password = read-host -AsSecureString
****************
PS > Import-PfxCertificate C:\Users\mfinnigan\Desktop\test.pfx -Password $password cert:\CurrentUser\my
PSParentPath: Microsoft.PowerShell.Security\Certificate::CurrentUser\my
Thumbprint Subject EnhancedKeyUsageList
---------- ------- --------------------
<snip> CN=<snip> Client Authentication
PS > get-pfxCertificate C:\Users\mfinnigan\Desktop\test.pfx -Password $password
Get-PfxCertificate: An error occurred during encode or decode operation.