Skip to content
AZ-09 Draft

Get-AzStorageContainer returns nothing

When key-based access is disabled on a storage account, the data-plane cmdlet comes back empty. Use the management-plane cmdlet.

Draft. The fix is known and correct, but we're still writing up the full step-by-step.

Cause

Get-AzStorageContainer is a data-plane cmdlet that typically authenticates with the storage account key. If key-based access is disabled on the account (a good security setting), it returns nothing or fails.

Fix

Use the management-plane cmdlet, which goes through Azure Resource Manager:

Get-AzRmStorageContainer -ResourceGroupName $rg -StorageAccountName $account

This guide is being expanded with full steps.

Seeing this in your environment?

We can check for this, and everything around it, as part of an audit.

Ask us about AZ-09

Find out what's really going on in your tenant.

Tell us what you run and what's worrying you. We'll recommend the right audit, and tell you honestly if you don't need one.