How can I check how much space I used in each of my azure storage accounts in my subscription resource group wise.
I am not able to find a way to check space used in
To get this in Powershell, it is kind of a pain, but might be useful for other folks (such as cleaning out old backups): Here's what I came up with, and it should work with AzureRM module 6.13.0 at least:
$azstorcontext = New-AzureStorageContext -StorageAccountName storageaccounthere -StorageAccountKey storageaccountkeyhere
$sizesOverall = @()
$containers = Get-AzureStorageContainer -Context $azstorcontext
foreach ($container in $containers)
{
Write-Output $container.Name
$contblobs = get-azurestorageblob -container $container.name -Context $azstorcontext
Write-Output " Blobs: $($contblobs.count)"
$containersize = ($contblobs | Measure-Object -Sum Length).Sum
Write-Output " Container Size: $containersize) (bytes)"
$sizesOverall
}