So I am running a simple script to get all of our AD groups in our domain along with their CN values (Distinguished name) it is part of a project to search for group nesting. My script below returns the group name but next column displays the error "
Am I missing something here? Ultimately just want the group name and the distinguished name so I can analyze which groups have nesting.
Get-ADGroup -filter * -Properties MemberOf |
Where-Object {$_.MemberOf -ne $null} |
Select-Object Name,MemberOf |
Export-Csv C:\Users\XXXXX\Documents\NestedGroups_2.csv
I believe you can pull out the MemberOf by doing this.