【问题标题】:Creating Azure self-signed sertificate with powershell Invoke-AddCertToKeyVault command使用 powershell Invoke-AddCertToKeyVault 命令创建 Azure 自签名证书
【发布时间】:2016-05-10 18:39:20
【问题描述】:

最近,我尝试根据微软的手册为 Azure 服务工厂创建自签名证书: Azure Docs: Secure a Service Fabric cluster, step 2.5, 02/05/2016 但是命令Invoke-AddCertToKeyVault 失败并出现下一个错误:

Invoke-AddCertToKeyVault :术语“Invoke-AddCertToKeyVault”不是 识别为 cmdlet、函数、脚本文件或可操作的名称 程序。检查名称的拼写,或者是否包含路径, 验证路径是否正确,然后重试。

我认为 Azure Powershell 已成功安装在我的机器上,因为我能够通过运行 Login-AzureRmAccount 登录到我的 Azure 帐户。 $env:PSModulePath 还表示 Azure 模块路径已添加到路径变量中(根据文章:Azure Docs: How to install and configure Azure PowerShell, 04/22/2016)。他们在这里:

...\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\;

...\Microsoft SDKs\Azure\PowerShell\ServiceManagement\;

...\Microsoft SDKs\Azure\PowerShell\Storage\;

另外,我在安装 Azure PowerShell 后重新启动了我的电脑。

我可能错过了一些东西,但我被它困住了。怎么解决?

【问题讨论】:

    标签: windows powershell azure


    【解决方案1】:

    那个命令行开关在应该被导入的包中 -

    Import-Module "C:\Users\chackdan\Documents\GitHub\Service-Fabric\Scripts\ServiceFabricRPHelpers\ServiceFabricRPHelpers.psm1"
    

    这是它的implementation,顺便说一下,它甚至存在的参考:)。试试 Import-Module,它应该可以工作。

    【讨论】:

    • 非常感谢!这对我帮助很大。我错过了它的原因 - 有对步骤 2.5 的引用,所以我在没有阅读之前给出的信息的情况下切换到它。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-02
    • 1970-01-01
    • 2016-07-27
    • 2013-02-05
    • 1970-01-01
    相关资源
    最近更新 更多