Link to home
Start Free TrialLog in
Avatar of he_who_dares
he_who_dares

asked on

LDIFDE Export Members of Distribution List & email addresses??

Hi Guys,

Not sure if this is in the right section, i couldnt find an AD section.

Basically i need to provide a .txt file listing all email addresses of users in a certain distribution list. So far all i can do is list members and the email address of the distribution list, i need the email addresses of the members of the list.

Heres an example of what ive got so far:

ldifde -f exportgroup.txt -s DC -d "cn=test3,cn=Users,dc=domain,dc=net" -l "member,mail"

As i say i only get the members and the email address of the list itself, ideally all i really need is a list of email addresses of the members. This is very urgent and so have given 500 points, please help!

Cheers

Dan.

ASKER CERTIFIED SOLUTION
Avatar of wwwally
wwwally
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LeeDerbyshire
I don't think you can get the email addresses from active directory like that.  You can get the members (like you have done), but the only email address stored in AD is that of the DL itself.  My guess is that when you send to the DL, the email addresses are resolved at send time from the member values.
Mind you, I haven't tried the dsquery method suggested by wwwally.  I meant to say that you can't get them using ldifde.
I tried wwwally's ds method, and it works great.  I am impressed!
Avatar of he_who_dares
he_who_dares

ASKER

Thanks for your help guys.

Just as a note for anyone else possibly reading this post... there is a program called Hyena that will pull all of this information out of AD plus much more, i found it soon after i posted on here and its a god send!

Cheers