Hi I need to run an ad query to get all active usernames in an ou?
thanks
Hi I need to run an ad query to get all active usernames in an ou?
thanks
can you not select an "active? true/faulse" column with;?
AD users & computers
view
add/remove columns
right click, export to csv
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)(!(user AccountControl:1.2.840.113556.1.4.803:=2)))
Thanks
You could also look at dsquery
They're both functions of DC's and are pretty simple to use but very scalable.
Code: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.
There are currently 1 users browsing this thread. (0 members and 1 guests)