?
Solved

Search for Users with Published Certificates in AD

Posted on 2007-03-19
4
Medium Priority
?
2,663 Views
Last Modified: 2012-08-14
Does anyone know how to find all users in AD with published certificates?  My org needs to know so that we can start disabling those account that do not contain a certificate.   The published certiticates cannot be seen unless you check 'advanced options' in AD users and computers.  But when I want to do a search under AD i cannot use that field to search.  Any clues?  Thanks guys!
0
Comment
Question by:ashaheed
[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
  • 2
4 Comments
 
LVL 30

Expert Comment

by:LauraEHunterMVP
ID: 18759257
You can use an LDAP query tool such as dsquery (built into the 2003 operating system), LDP (in the Support Tools) or adfind (free download from www.joeware.net) to query on the userCertificate attribute.  To use adfind, as an example, you would use the following syntax to return all users in your domain that have one or more certificates configured: (careful, this syntax will wrap - type it all on one line.)

adfind -default -f "(&(objectclass=user)(objectcategory=person)(userCer
tificate=*))"

To find users who -don't- have certificates, simply put a ! in front of userCertificate, like so:

adfind -default -f "(&(objectclass=user)(objectcategory=person)(!userCer
tificate=*))"

HTH

Laura E. Hunter - Microsoft MVP: Windows Server - Networking
0
 

Author Comment

by:ashaheed
ID: 18761812
This is great.  I downloaded the tool from the site you mentioned and it does what I want except I need to export this somehow in a report.  The screen just keeps scrolling and scrolling with tons of info.  Is there anyway to export it into a managable form (.xls, .csv, .txt)?

Thanks again!
0
 
LVL 30

Accepted Solution

by:
LauraEHunterMVP earned 2000 total points
ID: 18762391
You can use the "-dsq" option to return only the distinguished name (DN) of the objects rather than a full list of all object attributes, and pipe the whole thing to a text file using "> nocerts.txt".  So the full command string might look like: (again, all on one line)

adfind -default -f "(&(objectclass=user)(objectcategory=person)(!userCer
tificate=*))" -dsq > nocerts.txt

Adfind is an extremely flexible and powerful tool for querying AD - if you do a lot of work with AD it's worth playing around with it and reading through the different help screens (adfind -?, adfind -??, adfind -????, adfind -sc?, adfind meta?) to see all the different things you can do with it.  Adfind can only be used to query AD, not to modify it, so it's quite harmless to just play around with it - there's virtually ZERO chance of inadvertently breaking anything within your directory just by reading it.
0
 

Expert Comment

by:W_Anschutz
ID: 25135590
If you want to query directly in ADUC, create a custom query entering the following under Advanced > Enter LDAP query or you can rename the attached txt file to .XML, import under Saved Queries and reset the OU:

(&(&(&(&(objectCategory=person)(objectClass=user)(!userCertificate=*)))))
NoCerts.txt
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
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 …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Suggested Courses

762 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