Using DSQUERY you would do something like:
dsquery * domainroot -filter
"(&(objectCategory=person)(objectClass=user))" -attr givenName sn mail
You can pipe that to DSGET and do more.
I, and many others here, prefer ADFIND. It's a lot more powerful, and the
guy who wrote it frequently posts here and will always give plenty of help
and support. There's also forums for it's use on his website. Google
ADFIND.
adfind -default -f "(&(objectCategory=person)(objectClass=user))" givenName
sn mail
Here's a UI - lDAPDisplayName mapping:
-- http://msdn2.microsoft.com/en-us/library/ms677980.aspx
Look on MSDN for all the other attributes, or take a peek using ADSIEDIT and
the start building queries based on that info.
--
Paul Williams
Microsoft MVP - Windows Server - Directory Services
http://www.msresource.net | http://forums.msresource.net