Solved

Search for Users with Published Certificates in AD

Posted on 2007-03-19
4
2,246 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
  • 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 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Companies that have implemented Microsoft’s Active Directory need to ensure that the Active Directory is configured and operating properly. If there are issues found and not resolved, it eventually leads the components to fail or stop working and fi…
Resolve DNS query failed errors for Exchange
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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…

707 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

23 Experts available now in Live!

Get 1:1 Help Now