【问题标题】:Azure Storage Account (Classic) - Access using only the Account Name?Azure 存储帐户(经典)- 仅使用帐户名称访问?
【发布时间】:2021-01-31 14:17:33
【问题描述】:
我需要使用 CLI 或 Powershell (ARM) 从 Azure 存储帐户(经典)中检索密钥。这里唯一的挑战是我只获得了存储帐户名称和订阅。
使用 Get-AzStorageAccount 和 Get-AzStorageAccountKey,我需要提供资源组...我没有。使用“az storage account show-connection-string”,它只适用于 ARM 资源,而不适用于类存储。
寻找建议。
谢谢
【问题讨论】:
标签:
azure-storage
azure-cli
【解决方案1】:
你可以使用这样的东西:
Get-AzResource -ResourceType "Microsoft.ClassicStorage/StorageAccounts" | Where-Object {
$_.Name -eq $your_storage_account_name
}
找出这些信息