?
Solved

ADFIND unique titles for all the OU's

Posted on 2010-09-17
9
Medium Priority
?
1,286 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 4

Accepted Solution

by:
ChandarS earned 500 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
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
LVL 57

Assisted Solution

by:Mike Kline
Mike Kline earned 500 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

752 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