Link to home
Start Free TrialLog in
Avatar of Panda 5888
Panda 5888

asked on

Query AD 2003 data into a file

Anyone have a script to query data from AD 2003 into a CSV/XLS/TXT ?

I only need data from these fields:
1. logon id
2. display name
3. dept
4. telephone no
5. pager
6. mobile
Avatar of Mike Kline
Mike Kline
Flag of United States of America image

Give adfind a try

http://www.joeware.net/freetools/tools/adfind/index.htm

adfind -default -f "&(objectcategory=person)(objectclass=user)" samaccountname displayname department telephonenumber pager mobile  -csv > c:\users.csv

So there I only outputted a few attributes,  you can output any attributes you want.  Good list of the actual attribute names here

http://www.selfadsi.org/user-attributes-w2k3.htm

Thanks

Mike
ASKER CERTIFIED SOLUTION
Avatar of Joseph Daly
Joseph Daly
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Panda 5888
Panda 5888

ASKER

Thanks