Solved

ADFIND unique titles for all the OU's

Posted on 2010-09-17
9
1,255 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
 
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Creating and Managing Databases with phpMyAdmin in cPanel.
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
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…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

706 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

18 Experts available now in Live!

Get 1:1 Help Now