Hi Israel,
This script will list storage attributes, however I see the 'VersionProfile' field is empty on my new test storage account, so this may not help you. Here's a windows powershell script you can play with:
Install the Az module if you haven't already:
Install-Module -Name Az -AllowClobberr -Scope CurentUser
- Copy the contents below into a "runme.ps1" file and run it, eg: ./runme!.ps1
Connect-AzAccount
Get all subscriptions
$subscriptions = Get-AzSubscription
Initialize an array to store Storage Accounts using classic metrics
$classicMetricsStorageAccounts = @()
Iterate over each subscription
foreach ($subscription in $subscriptions) {
Set the context to the subscription Set-AzContext -SubscriptionId $subscription.Id Get all storage accounts in the current subscription $storageAccounts = Get-AzStorageAccount Check each storage account for classic metrics foreach ($storageAccount in $storageAccounts) { Get the metrics settings for the storage account $metricsSettings = Get-AzStorageAccountManagementPolicy -ResourceGroupName $storageAccount.ResourceGroupName -StorageAccountName $storageAccount.StorageAccountName -ErrorAction SilentlyContinue if ($metricsSettings -eq $null) { If $metricsSettings is null, this might indicate the storage account is using classic metrics $classicMetricsStorageAccounts += $storageAccount } } }
Output the list of Storage Accounts using classic metrics
$classicMetricsStorageAccounts | Format-Table StorageAccountName, ResourceGroupName, Location, SubscriptionId