Tuesday, May 23, 2023

Quick Code: AZ CLI To Get Storage Accounts And Redundancy Type (AKA sku.name)

Here's some quick code to get a list of your Storage accounts from a cloud shell in the Azure Portal.

az storage account list --query "[].{Name:name, Redundancy:sku.name}" --output table

That's it!

It will output something similar to this:

mystorageaccount1    Standard_LRS
mystorageaccount131    Standard_RAGRS

By default this will list everything for the subscriptions you have checked to show resources for in the portal.