Solved

ADFIND unique titles for all the OU's

Posted on 2010-09-17
9
1,270 Views
Last Modified: 2013-12-24
Hi all,
I am trying to construct a query to give me all the unique titles for the users in all the OU's.  I am new at adfind.  Can I get some help?  thanks
0
Comment
Question by:annayeg
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 4

Accepted Solution

by:
ChandarS earned 125 total points
ID: 33702971
0
 
LVL 1

Author Comment

by:annayeg
ID: 33703170
adfind -default -f "(&(objectclass=user)(objectcategory=person))" title >> c:\data\ad utility\output\users.csv

To find only the unique titles how can I modify the above query?

Thanks
0
 
LVL 4

Expert Comment

by:ChandarS
ID: 33703196
What do you mean by unique , Can you give me example ...

So I can help you out
0
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.

 
LVL 57

Assisted Solution

by:Mike Kline
Mike Kline earned 125 total points
ID: 33703251
So you can use Chandar's example and output any details you want, in his example he just outputted the title (DN will also be outputted in that example)
You can just add addributes if you want more.  A good page that shows list of attributes
http://www.selfadsi.org/user-attributes-w2k3.htm
Now if you want to output things that have dates and times you can decode them by adding the -tdca switch for example
If you want a csv output add -csv
Thanks
Mike
0
 
LVL 1

Author Comment

by:annayeg
ID: 33703326
by unique I mean the following if I have 200 systems engineers and 100 associates, I just want to be able to capture 1 system engineer and 1 associate.  Basically, I want to know how many titles we have in the company.
0
 
LVL 57

Expert Comment

by:Mike Kline
ID: 33703358
In that case I'd export to excel,  adfind is not going to give you a count of all the titles, it will just return them.
Now you can do something like
adfind -default -f  "&(objectcategory=person)(objectclass=user)(titele=associate)"  -c  
That will give you a count of all users whose title is associate
Thanks
Mike
0
 
LVL 4

Expert Comment

by:ChandarS
ID: 33703526
Just Try this out with ADFind Tool

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

What option you are getting

According you can change to the script file.
0
 
LVL 12

Expert Comment

by:FDiskWizard
ID: 33703846
You can also create a saved query in AD Users & computers with the same LDAP queries as provided above. (Custom query type)
DEFINE > Find drop down > Custom Query...
Enter like this:
(objectcategory=person)(objectclass=user)(title=*manager*)
It will auto add the &'s. Notice you can wildcard also... in case you have Engineer-1, Engineer-2, etc..

That would tell you in the GUI how many, and let you view any if you wanted.
0
 
LVL 1

Author Comment

by:annayeg
ID: 33704702
when I run this, it checks other OU's other than "offices".  Is my syntax correct?  Basically I want to query only the Offices OU and get the name and the title.

adfind -default -f "(&(objectclass=user)(objectcategory=person)(ou=offices, ou=exchange,dc=dc,dc=howrey,dc=net))" distinguishedName title >> c:\data\ad utility\output\users.csv
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
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?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

839 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