Hello All,
I was simply looking to remove the builtin\users acl from a network share and my logic - as far as I can tell - seems to be correct in the script that I wrote for it; I don't receive any error messages either, but when I go check ACLS, it's not removed. Below is what I'm working with"
$acls = Get-Acl '\\nyc-filer\shared\singapore compliance'
foreach ($acl in $acls) {
$folder = (convert-path $acl.pspath)
foreach($access in $acl.access) {
if($access.IdentityReference -eq 'BUILTIN\Users') {
$acl.RemoveAccessRule($access)
}
}
Set-Acl -Path $folder -AclObject $acl
}