itgeek Posted December 9, 2009 Posted December 9, 2009 Hi I need to run an ad query to get all active usernames in an ou? thanks
Guest Guest Posted December 9, 2009 Posted December 9, 2009 can you not select an "active? true/faulse" column with;? AD users & computers view add/remove columns right click, export to csv
itgeek Posted December 9, 2009 Author Posted December 9, 2009 Hi I can get a list of active users in a ou, the only thing I cant get working is to list the username? (&(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2))) Thanks
DrPerceptron Posted December 9, 2009 Posted December 9, 2009 You could also look at dsquery They're both functions of DC's and are pretty simple to use but very scalable. dsquery user OU=Sales,DC=Contoso,DC=Com -o samid >> c:\usernames.txt Will list the users in an OU, you can also filter that by the last logon time... but I can't remember that off the top of my head (I did it a couple of days ago and this is all I remember) - it's well documented on the net and in technet.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now