-1

I need to change storage account container and blob access level to private. I have more than 200 storage accounts and more than 1000 containers in my subscription.

Please suggest quick solution to do the same.

Thanks in advance

1 Answers1

1

The easiest way would be to loop over all containers using powershell and set the permission to off.

$ctx = New-AzureStorageContext -StorageAccountName <name> -StorageAccountKey <key>

Get-AzureStorageContainer -Context $ctx | Set-AzureStorageContainerAcl -Permission Off -PassThru

More info:

https://learn.microsoft.com/en-us/powershell/module/azure.storage/set-azurestoragecontaineracl?view=azurermps-6.13.0#example-2--set-azure-storage-container-acl-by-using-the-pipeline

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90