1

我面临以下问题

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。

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

4

1 回答 1

2

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

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

New-AzureRmStorageAccount
Get-AzureRmStorageAccount
Set-AzureRmStorageAccount
Remove-AzureRmStorageAccount
于 2015-11-21T07:50:02.837 回答