By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,335 Members | 1,310 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,335 IT Pros & Developers. It's quick & easy.

listing usernames from Active Directory

P: n/a
I am trying to list all usernames from active directory under the
domain ''

DirectoryEntry entry = new DirectoryEntry();
DirectorySearcher mySearcher = new DirectorySearcher(entry);
mySearcher.Filter = "(objectClass=user)";
//mySearcher.Filter = "(objectClass=person)";
//mySearcher.Filter = "(sAMAccountName)";

foreach(SearchResult result in mySearcher.FindAll())
IEnumerator ie =
listBox1.Sorted = true;


this is the code i am using. but there is something wrong. I seem to be
getting some usernames but not all usernames under the domain
'' . how do i specifiy the domain '' for the


May 17 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.