管理azure资源管理器存储powershell



我面临以下问题

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命令来管理基于ARM(Azure资源管理器)的存储帐户。

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

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

最新更新