Solved

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

Posted on 2014-04-16
7
5,466 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
Comment Utility
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
Comment Utility
Sorry friend but where do I create the query
1
 
LVL 13

Expert Comment

by:Santosh Gupta
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:wcgplc
Comment Utility
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
Comment Utility
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
Comment Utility
yep that worked. Thank you!!
0
 

Expert Comment

by:csdits
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this video we show how to create a Distribution Group 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 >>…
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…

771 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

10 Experts available now in Live!

Get 1:1 Help Now