[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2014-04-16
7
Medium Priority
?
7,371 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
[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
7 Comments
 
LVL 13

Accepted Solution

by:
Santosh Gupta earned 2000 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

650 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