可以使用PowerShell命令来安装证书到Trusted Root Certification Authorities存储区:
$certFilePath = "C:\MyCertificate.cer"
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certFilePath)
$store = New-Object System.Security.Cryptography.X509Certificates.X509Store("Root","LocalMachine")
$store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]"ReadWrite")
$store.Add($cert)
$store.Close()
将$certFilePath修改为CA根证书的文件路径,运行以上代码即可将证书安装到Trusted Root Certification Authorities存储区。