我正在尝试推出一种方法来推出多台计算机上的安装证书。我想出的方法是:
Invoke-Command ServerName {
Import-Certificate -FilePath "path" -CertStoreLocation Cert:\LocalMachine\Root
}
我得到了:
Access is denied. 0x80070005 (WIN32: 5 ERROR_ACCESS_DENIED)
+ CategoryInfo : NotSpecified (:) [Import-Certificate], Exception
+ FullyQualifiedErrorID : System.Exception,Microsoft.CertificationServices.Commands.ImportCertificateCommand
+ PSComputerName : ServerName
我以管理员身份运行本地PowerShell,我的帐户是目标计算机的管理员。我已经确认我可以安装证书。