我想在远程服务器上安装使用makecert.exe创建的证书(X.509)。我不能使用psexec或类似的东西,但必须使用PowerShell。
问题:如何在远程服务器上使用PowerShell安装证书。
要导入PFX文件,可以使用Import-PfxCertificate
,例如
Import-PfxCertificate -FilePath YOUR_PFX_FILE.pfx -Password (ConvertTo-SecureString -String "THE_PFX_PASSWORD" -AsPlainText -Force)
要在远程计算机上执行此操作,可以使用Invoke-Command -ComputerName
(并且对PFX文件使用UNC路径)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句