Solved

AD Pull

Posted on 2009-04-06
5
238 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

679 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