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.

he_who_daresAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
wwwallyConnect With a Mentor Commented:
I should use the 2003 ds commands to get the list.
It would look somthing like this:

dsquery group -name YourGroupname | dsget group -members | dsget user -email > c:\output.txt
Good luck,

Walter
0
 
LeeDerbyshireCommented:
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.
0
 
LeeDerbyshireCommented:
Mind you, I haven't tried the dsquery method suggested by wwwally.  I meant to say that you can't get them using ldifde.
0
 
LeeDerbyshireCommented:
I tried wwwally's ds method, and it works great.  I am impressed!
0
 
he_who_daresAuthor Commented:
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
0
All Courses

From novice to tech pro — start learning today.