管理蔚蓝的资源管理器存储的PowerShell

问题描述:

我面临以下问题管理蔚蓝的资源管理器存储的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 

我知道,我可以创造“经典”模式存储账户。但后来我无法将它用作使用资源管理器部署的虚拟机映像的源代码。

然而,这种方式,我无法管理该帐户,并使用PowerShell来上传斑点。

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

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

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

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