Setting file ACLs with PowerShell part 5
...dir foo.txt).GetAccessControl
newRule = New-Object Security.AccessControl.FileSystemAccessRule "keith", Modify, Allow
modified = $false
dacl.ModifyAccessRule("Add", $newRule, [ref]$modified
dir foo.txt).SetAccessControl($dacl
All I've got left to explain is the last line of code. It's important to note that when you're tweaking ACLs, there...





