Forum Topic

Thanks for your participation and contribution.


Back to Azure

Storage Accounts

Post a reply
490 views
i90runner
i90runner

Storage Accounts Public Access


alias az='noglob az' 

$rgName = "<resource-group>"
$accountName = "<storage-account>"

$storageAccount = Get-AzStorageAccount -ResourceGroupName $rgName -Name $accountName
$ctx = $storageAccount.Context

Get-AzStorageContainer -Context $ctx | Select Name, PublicAccess

az storage account list --query [].name 

az storage account list --query [?allowBlobPublicAccess=='True'].name

for i in $(cat accounts.txt); do
   az storage account update --allow-blob-public-access false --name $i
done

1-1 of 1

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.