【问题标题】:how to install certificate by command?如何通过命令安装证书?
【发布时间】:2022-02-18 15:04:15
【问题描述】:

我想在 Live 和 Acceptance Windows 服务器上安装证书。使用一些命令应该是可能的。我以前做过,但找不到。我认为它与“WinHttpCertCfg.exe”有关。

有人知道命令是什么,或者可以将我发送到某个网站。非常感谢..

【问题讨论】:

  • 您好,您解决了吗?怎么样?

标签: import installation certificate


【解决方案1】:

您可以使用命令行添加 Windows 证书存储:

certmgr.exe -add "Path\To\Cert\MyCertificate.cer" -s -trustedpublisher

您当然需要管理权限来执行此操作。

您可以找到更多信息here

提示:如果您要添加自签名证书,您还需要添加 新证书 派生的证书。 (示例:如果您创建了自己的 CA 中间证书,则还需要将其添加到证书存储中)

【讨论】:

    【解决方案2】:

    我使用以下命令使其工作:

    certmgr.exe /c /add my_cert.cer /s root

    仅供参考:https://msdn.microsoft.com/en/library/e78byta0(VS.80).aspx

    【讨论】:

      【解决方案3】:

      我已经在 Windows 7Windows 10 中对其进行了测试。这是命令:

      certutil -f -addstore CA <file_with_extension_and_complete_path>
      
      #certutil -f -addstore CA "D:\test\random.der"
      

      谢谢。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-12-10
        • 2020-01-10
        • 1970-01-01
        • 2013-10-04
        • 1970-01-01
        • 2011-05-21
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多