troubleshooting Question

Exporting list of users from AD groups and OUs?

Avatar of STEVEO
STEVEO asked on
Windows 2000
1 Comment1 Solution302 ViewsLast Modified:
I have often been asked to export a list of users from Distribution and security groups and OUs in Active Directory.

I tried the following code:

ldifde -f C:\ldif\ExportUsers.ldf –s SERVERNAME -d "OU=Test OU,dc=Company,dc=com" -p subtree -r "(objectClass=User)" -l "cn,givenName,Title,SamAccountName"

But I got a list of all users in the domain rather than just the OU, Anyone know what I did wrong?

Is there a better tool to use than LDIFDE?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros