Solved

AD Pull

Posted on 2009-04-06
5
233 Views
Last Modified: 2013-12-24
I need to pull the following fields out of AD, and I am trying to use csvde.  Not sure if that is the best way to go, but I don't see the fields that I need. Can anyone send me the correct tags to pull the following information?  Or if you have a better option, that would help too.
I need:
First Name, Last Name, Email, ExternalAccountUID,account name, manager name, Department, City, Office, Telephone Number, and Title.  

Thanks.
0
Comment
Question by:norwoodhelpdesk
  • 2
  • 2
5 Comments
 
LVL 57

Accepted Solution

by:
Mike Kline earned 500 total points
Comment Utility
I like a tool called adfind by MVP Joe Richards
http://www.joeware.net/freetools/tools/adfind/index.htm
try
adfind -default -f  "&(objectcategory=person)(objectclass=user)" cn sn mail samaccountname manager department L physicaldeliveryofficename telephonenumber title  -nodn -csv > c:\users.csv
That will create the users.csv on your C drive.  Let me know how that works.
On another note I always like the "L" for city (not intuitive), more on that here:  http://msdn.microsoft.com/en-us/library/ms676817(VS.85).aspx
 
Thanks
Mike
0
 

Author Comment

by:norwoodhelpdesk
Comment Utility
Good tool, that is really close.  I need a few more things from your pull.  it gave me full name, and I need first name for the first column, also I need the ExternalAccountUID (Ex. S-1-5-21-2261097160-2633569310-2490458840-1125).  Can this tool pull those for me?  What would the tags for those fields be?
0
 
LVL 3

Expert Comment

by:qualchoice-it
Comment Utility
Hi mkline71, that's the exact tool I was looking for as well, but its pulling back EVERYTHING as far as users, even my disabled ones.  I'm trying to get a process put together for our DBA's to publish a phone report to our companies Intranet.  Would you know what the commands are to run a cleaner report?  Basically just pull the information from specific OU's in my AD?  thanks for your valuable input so far.  
0
 

Author Comment

by:norwoodhelpdesk
Comment Utility
I found the fields and got what I needed.  Thanks so much for the direction to the tool!!!
0
 
LVL 57

Expert Comment

by:Mike Kline
Comment Utility
Glad to help out
@qualchoice
If you just want to search through an OU you have to specifiy that in base (using the -b switch).  Need to specifiy the DN of the OU.
So lets say my OU= testOU and my domain was MKtest.com
adfind -b OU=testou,DC=mktest,dc=com -f ...rest is the same
Thanks
Mike
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Synchronize a new Active Directory domain with an existing Office 365 tenant
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
how to add IIS SMTP to handle application/Scanner relays into office 365.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now