Link to home
Start Free TrialLog in
Avatar of wcgplc
wcgplc

asked on

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

How can I export a list of enabled users from active directory to Excel?
ASKER CERTIFIED SOLUTION
Avatar of Santosh Gupta
Santosh Gupta

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wcgplc
wcgplc

ASKER

Sorry friend but where do I create the query
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/
Avatar of wcgplc

ASKER

Thanks friend that worked perfect.

Could you advise on a string to export all the disabled users
Try this for disabled users.


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

Open in new window

Avatar of wcgplc

ASKER

yep that worked. Thank you!!
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