Exchange 2010 Distribution Group question

Welcome Forums General PowerShell Q&A Exchange 2010 Distribution Group question

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 7 years ago.

  • Author
  • #6526

    Points: 0
    Rank: Member

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

    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

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


    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 activedirectory
    Get-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

The topic ‘Exchange 2010 Distribution Group question’ is closed to new replies.