I had a need to get distribution group members for a specific group. Most people seem to install the free “ActiveRoles Management Shell for Active Directory” from Quest Software when they are facing a task such as this.
With the Quest “ActiveRoles Management Shell”, you can do this like “Get-QadGroupMember <group name>–Indirect”
I’m kind of contrary, and so I wanted to do the same thing with the Exchange Management Shell that came with our Exchange 2007 installation. So, I created the script shown here. Save it as get-exgrouprecurse.ps1.
Run it as:
get-exgrouprecurse -group <group name>
or get-exgrouprecurse <group name>