【问题标题】:Add-AzureAccount : The given key was not present in the dictionaryAdd-AzureAccount :字典中不存在给定的键
【发布时间】:2016-09-23 19:53:00
【问题描述】:

在 Microsoft Azure PowerShell 中,当我运行 Add-AzureAccount 命令时出现以下错误:

Add-AzureAccount : 给定的键不在字典中。

有人知道如何解决这个错误吗?

我有一个 Azure 帐户。 我正在使用 Azure PowerShell 0.8.16 版和 Windows 7 Service Pack 1。

【问题讨论】:

    标签: powershell azure


    【解决方案1】:

    我在这里找到了我的问题的答案

    http://blogs.msdn.com/b/devfish/archive/2015/02/12/get-azurevm-your-azure-credentials-have-not-been-set-up-or-have-expired-please-run-add-azureaccount-to-set-up-your-azure-credentials.aspx

    解决问题的步骤如下:

    1. 删除-AzureAccount

    2. 清除-AzureProfile

    3. 添加-AzureAccount

    【讨论】:

    • 这对我不起作用 - 我的情况是我没有权限访问整个订阅 - 只有一个资源组;我猜这就是问题所在。如果您有解决方法,请分享。
    【解决方案2】:

    我使用了AddAzureRmAccount 而不是AddAzureAccount,它确实有效。我不知道根本原因,我仍在深入研究。一旦我对可能的根本原因有了具体的了解,我会更新这个答案。

    【讨论】:

      猜你喜欢
      • 2016-07-23
      • 2012-02-18
      • 2016-08-14
      • 2022-09-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多