我面临以下问题
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 管理帐户和上传 blob。
关于如何管理基于资源管理器的存储帐户有什么想法吗?
最佳答案
您可以使用以下新的 PowerShell 命令来管理基于 ARM(Azure 资源管理器)的存储帐户。
注意:您需要更新支持此新功能的 Azure PowerShell 更高版本,例如 2015 年 11 月版本。此外,最新版本中已弃用 Switch-AzureMode 命令。
New-AzureRmStorageAccount
Get-AzureRmStorageAccount
Set-AzureRmStorageAccount
Remove-AzureRmStorageAccount
关于powershell - 管理 azure 资源管理器存储 powershell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33825016/