【问题标题】:New-SelfSignedCertificate is not recognized as a name of a cmdlet, running powershell on MacOSNew-SelfSignedCertificate 未被识别为 cmdlet 的名称,在 MacOS 上运行 powershell
【发布时间】:2022-12-20 19:45:17
【问题描述】:

就在今天早上,我使用 brew install --cask powershell 在我的 Macbook 上安装了 powershell。我运行的版本是7.3.1。

但是,当我运行 New-SelfSignedCertificate cmd 时,出现以下错误:

The term 'New-SelfSignedCertificate' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

【问题讨论】:

    标签: macos powershell


    【解决方案1】:

    要使用New-SelfSignedCertificate,您需要提供参数。
    例如:
    New-SelfSignedCertificate -DnsName "www.fabrikam.com","www.contoso.com" -CertStoreLocation "cert:LocalMachineMy"

    更多信息: https://learn.microsoft.com/en-us/powershell/module/pki/new-selfsignedcertificate

    【讨论】:

      猜你喜欢
      • 2020-05-25
      • 2014-08-25
      • 2019-11-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多