【问题标题】:manage azure resource manager storage powershell管理 azure 资源管理器存储 powershell
【发布时间】:2016-02-22 20:13:09
【问题描述】:

我面临以下问题

Switch-AzureMode AzureResourceManager
New-AzureStorageAccount -ResourceGroupName "XYZ" -Name "VmTemplateStorage" -Type "Standard_LRS"
# lists the account
Get-AzureStorageAccount

Set-AzureSubscription -SubscriptionName "ABC" -CurrentStorageAccountName -"VmTemplateStorage"

# now this outputs error saying: Storage account 'VmTemplateStorage' was not found.
Get-AzureStorageContainer

我知道我可以在“经典”模式下创建存储帐户。但是我无法将其用作使用资源管理器部署的 vm 映像的源。

但是,这样,我无法使用 powershell 管理帐户和上传 blob。

任何想法如何管理基于资源管理器的存储帐户?

【问题讨论】:

    标签: powershell azure azure-blob-storage azure-resource-manager


    【解决方案1】:

    您可以使用以下新的 PowerShell 命令来管理基于 ARM(Azure 资源管理器)的存储帐户。

    注意:您需要更新支持此新功能的 Azure PowerShell 更高版本,例如 2015 年 11 月版本。此外,Switch-AzureMode 命令在最新版本中已弃用。

    New-AzureRmStorageAccount
    Get-AzureRmStorageAccount
    Set-AzureRmStorageAccount
    Remove-AzureRmStorageAccount
    

    【讨论】:

      猜你喜欢
      • 2016-04-10
      • 2015-02-05
      • 1970-01-01
      • 2019-12-05
      • 2020-04-07
      • 2019-10-01
      • 2021-09-24
      • 1970-01-01
      相关资源
      最近更新 更多