2016-11-10 01:55 AM
I am trying to set file level (NTFS) permissions on files shared by netapp filer (7-mode) using PowerShell (ver. 2.0 and 4.0)
It works for domain accounts like:
$file =get-item file.txt $acl=get-acl $file $account = "domain\validaccount" $Rights = [System.Security.AccessControl.FileSystemRights]"Modify" $rules= $account,$Rights,"None”,”None”,”Allow” $accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $rules $acl.AddAccessRule($accessRule) set-acl -path $file -aclobject $acl
But as soon as I change the $account for filer local group (which I can set properly using windows explorer (righ click-> security->edit->add etc.) it doesn't work
$account = "FILERNAME\ValidFilerLocalGroup"
does NOT work.
Please advise. I am trying to make it work for days now and I tried to find similar problem on this forum as well as other places, without any luck so far.