How to find out the list of the containers who do not have the Immutable feature enabled under different 224 subscription

Prateek Rana 65 Reputation points
2023-05-31T12:39:03.7366667+00:00

Hi Team,

We have 224 subscriptions under these subscriptions we have lot of storage accounts. we want to know which storage/container are enabled with immutable features and which storage/container are not.

Please share the script which could help us to fetch this data in one Go.

Share the script for the TOP level (Tenant level) so that all the subscription will get covered under that and we can get a consolidate data.

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,543 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,202 questions
Windows for business | Windows Server | User experience | PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 20,782 Reputation points Microsoft Employee Moderator
    2023-06-01T02:13:32.1633333+00:00

    @Prateek Rana
    Thanks for posting your query on Microsoft Q&A.

    You can use the following Azure CLI commands to create a script that fits your scenario:

    1. List all storage account in a subscription - https://learn.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-list
    2. List all containers in each storage account - https://learn.microsoft.com/en-us/cli/azure/storage/container?view=azure-cli-latest#az-storage-container-list
    3. List immutability policy for each container - https://learn.microsoft.com/en-us/cli/azure/storage/container/immutability-policy?view=azure-cli-latest#az-storage-container-immutability-policy-show
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.