powershell - 管理 azure 资源管理器存储 powershell

标签 powershell azure azure-blob-storage 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

我知道我可以在“经典”模式下创建存储帐户。但随后我无法将其用作使用资源管理器部署的虚拟机镜像的源。

但是,这样我就无法使用 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/

相关文章:

asp.net - 如何查找 IIS 功能的名称

azure - SKYPE 上的自适应卡

postgresql - Airflow - 为什么外部数据库配置会破坏 helm 升级?

image - 使用 Azure 搜索 AzureSearch_SkipContent 元数据对图像建立索引,但不尝试提取内容

powershell - 为每个包含子文件夹的文件夹运行 powershell 脚本

xml - 从 XML 到 Excel 的舍入数字

powershell - 使用 Cascadia 代码 PL 时,Windows Terminal-PowerShell 某些字形图标未呈现

azure - Azure 存储帐户中的版本控制 Terraform 状态

azure - 使用 python 创建 Azure 存储授权 header

javascript - 通过 Javascript 和 PHP 组合将文件上传到 Azure 媒体服务 Assets