我有一个已知良好的 PFX 文件,并且密码正确。我可以使用 Windows 证书 UI 或 import-pfxcertificate cmdlet 导入它。但是,get-pfxcertificate 失败了。有什么想法吗?
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.