Solved

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

Posted on 2014-04-16
7
5,907 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exchange 2013 POP3 2 26
Inactive computer in domain 7 57
Exchange 2013 - Script needed 7 29
How to restrict users sending out emails to all 1 12
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
Read this checklist to learn more about the 15 things you should never include in an email signature.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 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

18 Experts available now in Live!

Get 1:1 Help Now