Quantcast
Viewing all articles
Browse latest Browse all 31638

Group membership and memberof information

Hey Folks,

I know how to get the membership information of security group from active directory.what  I am looking is a script that will query a particular OU  get all the security groups in Active directory and  reports members and memberof information of that particular security group and  export into excelsheet

Below script  will report the members information not memberof information

 $a =Get-ADGroup -Filter '*' | select-object * | where-object {$_.distinguishedname -like "*,OU=ROLES,*"}

$a |%{$_.name;Get-ADGroupMember $_.name}



Viewing all articles
Browse latest Browse all 31638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>