问题:
我知道导入PfxCertificate,并且要导入.pfx,我将执行以下操作:
$pwd = ConvertTo-SecureString -String "PrivateKeyPasswordGoesHere" -AsPlainText -Force
Import-PfxCertificate -Password $pwd -FilePath "pathtopfxfilepfxfile.pfx" -CertStoreLocation Cert:LocalMachineMy -Exportable # optional if i want the private key to be exportable
这很好,但与手工繁琐的方式,它只带来实体证书本身;
我还尝试了以下方法:
- 手动导入到证书mmc
- 使用Export-PfxCertificate导出整个链(必须假定这样做是由Import-PfxCertificate消耗的格式进行的)。
- 使用Import-PfxCertificate导入导出的证书
但是同样,Import-PfxCertificate不会引入完整的链。
答案1:
如果完整的证书链是PFX文件的一部分,Import-PfxCertificate
将导入所有相关的证书,并将它们放入适当的文件夹。
您无需执行其他任何操作。
相关文章