Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click 'Clears listbox results.Items.Clear() 'Connect to AD Database Dim rootEntry As New DirectoryEntry("GC://DC=TonyNet,DC=org", Domain.Text + userID.Text, password.Text) 'Set What you want to search for Dim searcher As New DirectorySearcher(rootEntry) searcher.PropertiesToLoad.Add("cn") searcher.PropertiesToLoad.Add("mail") 'Set Your Search Filter searcher.Filter = "(objectCategory=Computer)" 'Finds all Dim queryResults As SearchResultCollection queryResults = searcher.FindAll() 'Puts the results into a list Box Dim result As SearchResult For Each result In queryResults results.Items.Add(result.Properties("cn")(0)) Next End Sub
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
13 Experts available now in Live!