Active Directory in VB.NET
The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Active Directory in VB.NET
The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Active Directory in VB.NET
Join the conversation! Your thoughts help the community grow.
Join to leave a comment
Members earn 10 SHARP for a comment, 10 SHARP for a reaction, and 1,000 SHARP for every article they publish.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyFeatured eBookClaude for AI-Native BuildersDownload nowWrite an article and earn +1,000 SHARP when it is approved.
Write an article
Kapil GargPosted Jun 11, 2010, 4:50 AM EDT
Hi i m not able to create mailbox for a user using the .vbs scripts.the errois on createmailbox function (createmailbox is not supported). please give me solution . its very urgent. Thanks.
xiao kiatPosted May 25, 2010, 6:40 PM EDT
hi, I am new to vb.net, I need help to create a windows service application that get input from a domain user list(text file) and randomly generate a password to it, ho to do it? thanks..
Daniel MorrowPosted Mar 22, 2010, 10:09 AM EDT
Where do I get ADHelper? thanks!
Raman KatwalPosted Jan 14, 2010, 6:55 AM EST
Hi Erika, Need some help... As you mention in step 1. Public Shared Function GetDirectoryEntry() As DirectoryEntry Private de As DirectoryEntry = New DirectoryEntry() Private de.Path = "LDAP://192.168.1.1/CN=Users;DC=Yourdomain" de.Username = "yourdomain\sampleuser" de.Password = "samplepassword" Return de End Function Which IP address I have to use and how I can find it. If I am trying to access the mails from My office email address end with @dell.com and exchange login starts with perotsystems.net\MyUserID. The what will be the domain perotsystems.net or dell.com. I am confusion. I write the code but every time its display exception as "The server is not operational". I trying to check whether user exists or not. Please help
Raman KatwalPosted Dec 24, 2009, 9:41 AM EST
Hi Erika I have gone through the article. Its really fantastic job you has done. I'm writting a windows application with some basic networking tools and daily routines tools like Notepad, Chat messenger etc. I need some help in this regard. I want to read list of the Users from AD using VB.NET with some basic details like UserID(ChatID), Email and ContactNo. to display in listbox control. Please suggest some way to do this even if I dont know the username/password for admin rights. Thanks & Regards, Raman Katwal
luke boycePosted Feb 25, 2009, 3:44 PM EST
I'm getting Name 'ADHelper' not declared form the line: Dim de As DirectoryEntry = ADHelper.GetDirectoryEntry() Is this a third party dll I need to acuire and reference? any help's good help Cheers
wang kanbinPosted Dec 6, 2008, 11:03 PM EST
thk's
MohammedPosted Nov 25, 2008, 1:58 AM EST
How do I know if I have successfully Connected to the Active Directory or not?
mukunda charPosted Sep 30, 2008, 2:04 AM EDT
hi Can any one help me how to list all the contact in the active directory or how to list all the contact in the particular group of active directory thanks in advance Mukunda
Winnie SuneditedPosted Jan 7, 2008, 8:06 AM ESTEdited Jan 7, 2008, 9:43 AM EST
I get compile error in the ModifyUser Function Sample Code provided in Active Directory in VB.NET Article, Error in following Line, Dim ds As DirectorySearcher = New DirectorySearcher(de) Error Message, Class 'System.DirectoryServices.DirectoryEntry' cannot be indexed because it has no default property. Thank you for your time.
Manuel SilvaPosted Jun 21, 2007, 3:27 AM EDT
Hi, Congrats for the class! But i have one doubt what is employeeID, how can I know how to generate it? I already used a LDAP browser but i can't find any employeeID! Need to know this to add users to the AD. Other thing, in 3. Validate if a user exists Function is better to use deSearch.Filter = "(&(objectClass=user) (sAMAccountName=" & UserName & "))" filter cuzz i gues cn could have duplicated values.
Randall ArnoldPosted May 31, 2007, 8:17 AM EDT
Something is missing. For example, I need to log on using authentication via a special account, then search for users. So the login path is not the same as the search path! I am pulling my hair out trying to figure out how to accomplish this. Your user validation example (#3) seems to pull a directoryentry out of thin air...??? How do I log in using a special account (ou=SystemUsers,ou=Accounts,o=company) and then use that connection to search under all users (ou=People)?
Husam HmoudPosted Jul 6, 2006, 6:53 AM EDT
Hope you can help in this issue ... Do you have a method that I can verify a user name and password using it? I tired allot and searched allot but couldnt find any useful way. I have an application which I have to verify the logged inn user from the Active Directory of the company's domain. Waiting your answer. Regards,
DOTNETHEAVEN DOTNETHEAVENPosted May 18, 2006, 10:24 PM EDT
I have user Name in Active Directory as Mohd Adris, Daeng It contains both space and coma I query the ActiveDirectory using the cn attribute to get the emailID below i have attched the code Following code doesnt work only for this user givenName ="CN=Mohd Adris\, Daeng" Public Function GetMembersEmail(ByVal givenName As String) givenName = Chr(&H22) + givenName + Chr(&H22) Dim search As DirectorySearcher = New DirectorySearcher search.Filter = givenName search.PropertiesToLoad.Add("mail") search.SearchScope = SearchScope.Subtree Dim result As SearchResult = search.FindOne() If Not IsNothing(result) Then Dim email As String = result.Properties("mail")(0) End If