Pages

Monday, August 28, 2006

Exchange: LDIFDE Export Members of Distribution List

Summary:

This article will go over how to export members of a distribution list using LDIFDE.

There is MS KB article: http://support.microsoft.com/?kbid=555365
How to export the members of a distribution group in Exchange 2000/2003 using LDIFDE
which provides a sample of an LDIFDE command to export the properties.

ldifde -f export.ldf -d "cn=\Partners,ou=users,dc=microsoft,dc=com" -l member -s DC01

However, when you run the command, you receive no entries found:

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

Cause:

Remove the slash in "cn=\"

In order to exporting any property for this user, you need to get the full DN. In order to get the full DN. Perform the following steps.

1. Start, Run, Adsiedit.msc (Part of Windows Server Support Tools)
2. Expand your Domain. This should mimic your OU structure.
3. Expand through your OU tree until you locate your group.
4. Once you have located your group CN=Group Name, right click properties.
5. Locate the attribute DistinguisedName and double click.
6. Copy the entire string which should be in the following format:
CN=My Group Name,CN=Users,DC=corp,DC=domain,DC=net
7. Enter in the following LDIFDE command.


C:\Documents and Settings\user>ldifde -f exportgroup.ldf -s MYDC -d
"cn=my group,cn=users,dc=corp,dc=redcross,dc=net" -l "member"


Note: if you would like to get more information other than group membership here is an example command:

C:\Documents and Settings\user>ldifde -f exportgroup.ldf -s MYDC -d
"cn=my group,cn=users,dc=corp,dc=redcross,dc=net" -l "dn, givenname, department, member"




James Chong
MCSE M+, S+, MCTS, Security+
msexchangetips.blogspot.com


How useful was this article? Want to see a tip not listed? Please leave a comment.

11 comments:

  1. Anonymous9:19 PM

    its works fine, but my scenario is I am having one distribution group and it contains external contacts and I want to export all the contact name and email id in excel or text file.

    ReplyDelete
  2. Anonymous5:51 PM

    Hi

    I am using LDIFDE to export user and group info in to a file and then do a csv convertion on that.

    I have a problem in decoding the base64 encoded value. It is not able to decode the values properly. I tested my decoder wit h other apps it decodes the UTF-8 to Base64 encoded strin correctly. Is the encoding mechanism used in LDIF is UTF-8 base 64 or is it different?

    ReplyDelete
  3. Anonymous5:46 AM

    Nice post as for me. It would be great to read a bit more concerning that topic. Thanks for sharing this information.
    Sexy Lady
    Blonde escorts

    ReplyDelete
  4. Anonymous6:47 PM

    Still today, replica handbags is recognized for its high quality purse. At the factory level, if a purse does not meet the replica louis vuitton standards it is destroyed. replica handbags has been in business for an amazing 3 centuries and replica bags continues to be fore front in the hand bag industry.

    ReplyDelete
  5. Anonymous8:17 AM

    Not working at all.
    "No entries found"

    ReplyDelete
  6. أن العقارب من الحشرات الزاحفة السامة وتعتبر من بين الحشرات الخطيرة، وخطر تلك الحشرة قد يترك تأثيره على الإنسان بصورة هائلة، فهو يقوم بلدغ الإنسان وإصابته في الوضع وقد تكون السبب في أكثرية الأوقات لوفاه ذلك الفرد ولذا فهي حشرة لا مفر من التداول السريع معها حتى نتفادى خطر تلك الحشرة .
    شركة مكافحة النمل الابيض بالاحساء
    شركة مكافحة حشرات بالاحساء
    شركة رش مبيدات بالاحساء
    ارخص شركة مكافحة حشرات

    ReplyDelete