- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All Topics I have the code listed below and what I'm trying to do is find a particular user in Active Directory. The code below is listing out all users, but I can't find the one I'm looking for. One thing that I know is different with this user is that he doesn't not have a mailbox (and never will). The people that I see do have mailboxes set up, I don't know if this has anything to do with it or not.
Dim directory As New System.DirectoryServices.D
Dim src As New System.DirectoryServices.D
For Each res As System.DirectoryServices.S
ListBox1.Items.Add(res.Pro
Next
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: DotNetLover_BaanPosted on 2004-06-24 at 08:35:22ID: 11390123
Hi there...
irectoryEn try("") irectorySe archer(dir ectory, "(|(&(objectCategory=user) (name=*))) ") earchResul t perties("N ame")(0).T oString)
use,
Dim directory As New System.DirectoryServices.D
Dim src As New System.DirectoryServices.D
Dim res As System.DirectoryServices.S
Try
For Each res In src.FindAll
ListBox1.Items.Add(res.Pro
Next
Catch ex As Exception
MsgBox(ex.ToString)
End Try
**Leave the "Path" in the DirectoryEntry blank.. it will display all users.... in the local domain.
-Baan