Tuesday, July 26, 2005

How to export the members of a distribution group in Exchange 2000/2003 using LDIFDE.

 Export distribution group members using LDIFDE

These steps outline how to export the members of any distribution group from Active Directory using LDIFDE.  The syntax required
looks like this:
ldifde -f export.ldf -d "cn=\distribution group DN" -l member -s server
-f     specifies the file name to save the data to.
-d    specifies the RootDN (basically where the search starts).
-l     specifies what parameter you are interested in (in this case we are looking at the 'member' attribute.)
-s    specifies which Active Directory Domain Controller to use.
The distribution group DN (Distinguished Name) consists of the following:
     1. Distribution Group name
     2. OU that the Distribution Group resides in
     3. NetBIOS domain name
     4. Top level domain which domain resides in (usually 'com' but not always)
As an example, to export the members of a Distribution Group named 'Partners' in the 'Users' OU, you would use the following
syntax against the domain controller DC01 in the Microsoft.com domain:
ldifde -f export.ldf -d "cn=\Partners,ou=users,dc=microsoft,dc=com" -l member -s DC01
Your output would look like this:
changetype: add
member: CN=Smith\, Bob,OU=Users,DC=microsoft,DC=com
member: CN=Smith\, Glen,OU=Users,DC=microsoft,DC=com
You could then take this output and view it with notepad or import it in to Excel for manipulation.  This is just one of the many
uses of ldifde.  The full syntax of the command can be viewed by typing 'ldifde' at a command prompt.  As always, fully
understand the impact of your syntax before running it against a production Active Directory.

1 comment:

123 123 said...

Interesting blog you got here. I'd like to read something more concerning this topic. Thanks for giving that data.
Sexy Lady
London night life escort