Created
April 9, 2023 23:13
-
-
Save soulemike/d5f860b37b1ddc55dcb29fbfbfe004f6 to your computer and use it in GitHub Desktop.
Set all Azure Files for default permissions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://learn.microsoft.com/en-us/azure/storage/files/storage-files-identity-ad-ds-assign-permissions?tabs=azure-powershell#share-level-permissions-for-all-authenticated-identities | |
Get-AzStorageAccount|%{ | |
$x=$_; | |
$_.AzureFilesIdentityBasedAuth|?{$_.DefaultSharePermission -eq $null}|%{ | |
Set-AzStorageAccount -DefaultSharePermission "StorageFileDataSmbShareContributor" -ResourceGroupName $x.ResourceGroupName -AccountName $x.StorageAccountName | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment