79601558

Date: 2025-05-01 08:14:18
Score: 0.5
Natty:
Report link

Listing only Archive blobs using Az CLI

I had workaround in my environment using the same command

az storage blob list --account-name accountname --container-name container-name --account-key "account-key" --query "[?properties.blobTier=='Archive'].name" --output tsv

Also, I added ForEach-Object to get the "rehydrate" information with print messages.

az storage blob list --account-name <account name> --container-name <container name> --account-key "<account key>" --query "[?properties.blobTier=='Archive'].name" --output tsv | ForEach-Object { Write-Output "Blob: $_ | Tier: Archive"; Write-Output "Rehydrating blob: $_" }

I successfully got the list of archived blobs

Output:

Image

Image1

It may be due to there were no Archive-tier blobs at the time, or the wrong property access tier was used earlier.

Reference:

az storage blob list

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Harshitha Bathini