$Users = Get-ADUser -Filter {SamAccountName -like '*inger*'} | Select-Object -Property DistinguishedName$SecurityAllUsers = $Users | ForEach-Object { get-acl "ad:$($_.distinguishedname)" }$Security = $SecurityAllUsers | Where-Object {$_.AreAccessRulesProtected}$security = $Security | Sort-Object -Property PSpath$Security |select -Property AreAccessRulesProtected, psChildname, PSparentpath | export-csv -Path c:\tmp\xxx01.csv -Encoding ASCII
↧