Here one I have no clue why I wrote it, in any event I
thought I would share. This script looks
up all users with similar titles and documents every group they are a member
of. In environments where access is
granted by a person’s job role this may come in handy to validate like job
roles are in the same group, have the same access especially after
adds/changes.
Start of script
Get-ADUser -filter { title -like "*Manager*" } |
Select-Object samAccountName | foreach { (Get-ADUser $_.samAccountname
–Properties MemberOf | Select-Object MemberOf).MemberOf | Out-File c:\temp\Member_of_Manager.txt
}
End of script
No comments:
Post a Comment