#Below script used to assign NTFS permissions( List,Read,Traverse, Create/Append) for FSlogix user profiles, it provides users not to access other folders # User Groups/Users are given in input file , Keep Heading(top) GROUPS and provide groupnames under that # Input your Storage account name and Domain Name in below script $permission = ":(X,RD,AD,RC)" $Lists = Import-csv -Path "C:\temp\devgroups.csv" #group Accounts $shares = "office2,office3" $sharelist = $shares.Split(",") foreach($share in $sharelist) { $share $shrpath=\\.file.core.windows.net\$share foreach($list in $lists) { $UserName = $list.groups Invoke-Expression -Command ('icacls $shrpath /grant "\${UserName}${permission}"') } }