【问题标题】:Issue with setting up StorageAccountname while starting Azure machine through Powershell通过 Powershell 启动 Azure 机器时设置 StorageAccountname 的问题
【发布时间】:2016-09-05 02:12:32
【问题描述】:

我正在尝试安装和配置 Azure Powershell,但令人惊讶的是,我在设置 StorageAccountName 参数时遇到了问题。

我在企业帐户上设置了 vm,资源组名称为 "RG-1",存储帐户名称为 rg13675 and rg16461。在深入了解我的资源组后,我找到了这些存储帐户名称。

在运行命令时,

Set-AzureRmCurrentStorageAccount –ResourceGroupName “RG-1” –StorageAccountName “rg16461"

我的 powershell 报错:

Set-AzureRmCurrentStorageAccount : The Resource 'Microsoft.Storage/storageAccounts/rg16461' under resource group 'RG-1' was not found.

At line:1 char:1
+ Set-AzureRmCurrentStorageAccount –ResourceGroupName “RG-1” –StorageAc ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Set-AzureRmCurrentStorageAccount], CloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Management.Storage.SetAzureRmCurrentStorageAccount

【问题讨论】:

    标签: powershell azure


    【解决方案1】:

    您收到此错误的原因是您的存储帐户是 classic 存储帐户(来自您共享的屏幕截图),而 cmdlet 需要 resource manager (ARM) 存储帐户。

    请使用 Resource Manager 部署选项创建一个新的存储帐户,并尝试在您的 cmdlet 中使用该帐户的名称。这应该可以解决错误。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-03-01
    • 2017-04-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-13
    相关资源
    最近更新 更多