0
votes

I need to use either CLI or Powershell (ARM) to retrieve the key from an Azure Storage Account (Classic). The only challenge here is that I'm given only the storage account name and subscription.

With Get-AzStorageAccount and Get-AzStorageAccountKey, I need to provide the Resource Group... which I don't have. With "az storage account show-connection-string", it only works with ARM resource but not class storage.

Looking for suggestions.

Thanks

1

1 Answers

0
votes

you can use something like this:

Get-AzResource -ResourceType "Microsoft.ClassicStorage/StorageAccounts" | Where-Object {
    $_.Name -eq $your_storage_account_name
}

to find out that information