Announcement

Collapse
No announcement yet.

Export users assocaited to Email Distribution List

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Export users assocaited to Email Distribution List

    I have a request to create a list of all Email Distribution groups and their associated memebers. I figured this would be a very straight forward request but it has turned out to be anything but. I guess I either don't know where to look or I can't understand how to use LDIFDE to create the needed file.

    So if I go to AD Users/Computers and click on my Domain you would see the following OU's.
    MyDomain > Company > Groups > Email Distribution

    all my distribution groups are under this folder(OU). So I run the following command:

    ldifde -f groups.ldf -s domainController1 -d "CN=Email Distribution,OU=Email Distribution,OU=Groups,OU=Company,DC=MyDomain,DC=l ocal" -l "cn,groupType,member"

    And I get the following respone:

    Connecting to "domainController1"
    Logging in as current user using SSPI
    Exporting directory to file groups.ldf
    Searching for entries...
    Writing out entries
    No Entries found

    The command has completed successfully

    Not sure what piece I am forgetting but I would appreciate any help.

    thanks,

    Server 2003

  • #2
    Re: Export users assocaited to Email Distribution List

    Code:
    Get-DistributionGroup | Get-DistributionGroupMember | Export-CSV C:\data.csv
    Should do what you need mate.

    Comment


    • #3
      Re: Export users assocaited to Email Distribution List

      While the command provided by DeanPorter ist working it don't gives you the names of the DLs just the member, you can stick with ldifde but correct the BaseDN filter. Just cut the entry "CN=Email Distribution," and your command will work fine.

      It should looks like this:

      ldifde -f groups.ldf -s domainController1 -d "OU=Email Distribution,OU=Groups,OU=Company,DC=MyDomain,DC=l ocal" -l "cn,groupType,member"

      Comment


      • #4
        Re: Export users assocaited to Email Distribution List

        Thank you for the response, I tried the updated ldifde but still got the same issue:

        Connecting to "domainController1"
        Logging in as current user using SSPI
        Exporting directory to file groups.ldf
        Searching for entries...
        Writing out entries
        No Entries found

        The command has completed successfully

        Is there any issues with spaces for the names in the OU's?

        As for DeanPorter's suggestion, is that PowerShell? I just wanted to make sure I did the command from the correct location. I take it I will login to the Exchange server and then run that command?

        Thanks again,

        Comment


        • #5
          Re: Export users assocaited to Email Distribution List

          Never mind, that worked perfect. I had put an extra space in one of my OU's.

          thanks for the help.

          Comment

          Working...
          X