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:
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.
Article ID: 555365 - Last Review: 14 Feb 2017 - Revision: 1