[Solved] Powershell apply a function to each member of a list


try this

$perm = $acl.Access | select IdentityReference, FileSystemRights | where {$_.IdentityReference -notin @("BUILTIN\Administrators", "NT AUTHORITY\SYSTEM")}
$perm | %{yourfunction $_.IdentityReference}

or on the same line

$acl.Access | select IdentityReference, FileSystemRights | where {$_.IdentityReference -notin @("BUILTIN\Administrators", "NT AUTHORITY\SYSTEM")} | %{yourfunction $_.IdentityReference}

solved Powershell apply a function to each member of a list