Solved

AD Pull

Posted on 2009-04-06
5
235 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
ID: 24081800
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
ID: 24086668
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
ID: 24086850
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
ID: 24087131
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
ID: 24089412
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AWS RDS Backups? 3 39
Passive Exchange Mailbox Database copy is failed and suspended, so how? 4 30
Mongo DB 18 41
Lync 2010 4 22
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html) provided 218 attendees with a step-by-step guide for identifying Acti…
This video discusses moving either the default database or any database to a new volume.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

776 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