# Exchange 2010 Distribution Group question

**URL:** <https://forums.powershell.org/t/exchange-2010-distribution-group-question/1580>\
**Category:** PowerShell Help\
**Created:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/exchange-2010-distribution-group-question/1580 "2011-12-31T18:30:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![archives](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@archives](https://forums.powershell.org/u/archives)\
**Post date:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/exchange-2010-distribution-group-question/1580/1 "2011-12-31T18:30:00Z")

</div>

by gingalls at 2013-02-27 17:40:37

> Hello,  
> I need assistance with extracting the individual users from a distribution list that contains nested groups within it.  
> I need to also include the full names and primary SMTP addresses of the DL’s individual members.  
>   
> Let me know if you need any additional information.  
>   
> Many thanks  
> Gordon

by compugab at 2013-02-27 19:15:43

> Hello,  
>   
> The easiest way to do that is to use the Active Directory module, the _Get-AdGroupMember_ cmdlet and the _Recursive_ parameter like so:   
>   
> `Import-Module activedirectoryGet-ADGroupMember -Identity root -Recursive | ForEach-Object{Get-Mailbox -identity $_.Name | Select-Object Name,PrimarySMTPaddress}`  
>   
> Now, can you install the Active Directory module on your Exchange Server?

by gingalls at 2013-02-27 19:56:47

> We have dedicated management servers that have the Exchange 2010 tools installed and load the ActiveDirectory module there which allows us to run these types of scripts without having to  
> install the ActiveDirectory module onto the Exchange servers themselves.  
>   
> This script worked great. I just had to add DisplayName after Select-Object and export it out to .csv.  
>   
> I thank you  
> Gordon

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:57pm UTC](https://forums.powershell.org/t/exchange-2010-distribution-group-question/1580/2 "2024-05-16T20:57:59Z")

</div>

Closed on May 16, 2024, 8:57pm UTC


