管理azure资源管理器存储powershell

时间:2015-11-20 10:59:53

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

我正面临以下问题

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。

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

1 个答案:

答案 0 :(得分:2)

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

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

New-AzureRmStorageAccount
Get-AzureRmStorageAccount
Set-AzureRmStorageAccount
Remove-AzureRmStorageAccount
相关问题