Solved

How can I export a list of all enabled users from active directory?

Posted on 2014-04-16
7
5,671 Views
Last Modified: 2016-11-29
How can I export a list of enabled users from active directory to Excel?
0
Comment
Question by:wcgplc
  • 3
  • 3
7 Comments
 
LVL 13

Accepted Solution

by:
Santosh Gupta earned 500 total points
ID: 40003599
Hi,


Create a new query, point the Query Root, click "Define Filter", select "Custom Search" from the drop down box, click Advanced tab and paste in the following LDAP filter


(&(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))

Open in new window

then right click on query and export the report.
0
 

Author Comment

by:wcgplc
ID: 40003619
Sorry friend but where do I create the query
1
 
LVL 13

Expert Comment

by:Santosh Gupta
ID: 40003641
Hi,

open ADUC (run DSA.MSC) and then explore to saved query, right click on it and create new query.

http://thommck.wordpress.com/2011/03/04/using-saved-queries-to-filter-active-directory-users-and-computers/
0
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.

 

Author Comment

by:wcgplc
ID: 40003659
Thanks friend that worked perfect.

Could you advise on a string to export all the disabled users
0
 
LVL 13

Expert Comment

by:Santosh Gupta
ID: 40003749
Try this for disabled users.


(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=2))

Open in new window

0
 

Author Comment

by:wcgplc
ID: 40003836
yep that worked. Thank you!!
0
 

Expert Comment

by:csdits
ID: 41906181
Hello,

I would be interested in this as well.   I got the disabled query to work but the enabled one doesn't for some reason.
Capture.JPG
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

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

932 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

9 Experts available now in Live!

Get 1:1 Help Now