【问题标题】: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
    }
    

    找出这些信息

    【讨论】:

    • 谢谢。这是我可能会使用的选项。
    猜你喜欢
    • 2017-03-24
    • 2016-09-10
    • 2015-12-13
    • 2021-10-12
    • 2015-10-31
    • 2021-06-05
    • 1970-01-01
    • 2022-11-08
    • 2017-07-08
    相关资源
    最近更新 更多