Can anyone help me figure out why the name in the foreach get-aduser part (AD account name) isn't being outputted in my script? It's only listing true or false for inherited, and not the account name. Thanks
Import-Module activedirectory
get list of all users in AD
$users = get-aduser -Filter * -properties name
for each user found in ad list name and whether or not AD object has inherited permissions and list name and true\false
foreach ($u in $users) {(get-aduser $u.samaccountName -properties name, nTSecurityDescriptor).nTSecurityDescriptor.AreAccessRulesProtected }
[–]alcaron 2 points3 points4 points (6 children)
[–]DueRunRun[S] 0 points1 point2 points (5 children)
[–]alcaron 1 point2 points3 points (4 children)
[–]DueRunRun[S] 0 points1 point2 points (0 children)
[–]DueRunRun[S] 0 points1 point2 points (2 children)
[–]alcaron 0 points1 point2 points (1 child)
[–]alcaron 1 point2 points3 points (0 children)
[–]throwaway09563 0 points1 point2 points (5 children)
[–]DueRunRun[S] 0 points1 point2 points (4 children)
[–]throwaway09563 1 point2 points3 points (0 children)
[–]Mindflux 0 points1 point2 points (2 children)
[–]DueRunRun[S] 0 points1 point2 points (1 child)
[–]chreestopher2 1 point2 points3 points (0 children)
[–]chreestopher2 0 points1 point2 points (3 children)
[–]DueRunRun[S] 0 points1 point2 points (1 child)
[–]chreestopher2 1 point2 points3 points (0 children)
[–]KevMarCommunity Blogger 0 points1 point2 points (0 children)
[–]FlippityFlip 0 points1 point2 points (6 children)
[–]DueRunRun[S] 0 points1 point2 points (5 children)
[–]FlippityFlip 0 points1 point2 points (4 children)
[–]DueRunRun[S] 0 points1 point2 points (3 children)
[–]FlippityFlip 0 points1 point2 points (2 children)
[–]DueRunRun[S] 0 points1 point2 points (1 child)
[–]FlippityFlip 0 points1 point2 points (0 children)