?
Solved

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

Posted on 2014-04-16
7
Medium Priority
?
7,577 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 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
Steps to fix “Unable to mount database. (hr=0x80004005, ec=1108)”.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

850 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