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
15 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
Kapil GargPosted Jun 11, 2010, 8:50 AM
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, 10:40 PM
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, 2:09 PM
Where do I get ADHelper? thanks!
Raman KatwalPosted Jan 14, 2010, 11:55 AM
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, 2:41 PM
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, 8:44 PM
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 7, 2008, 4:03 AM
thk's
MohammedPosted Nov 25, 2008, 6:58 AM
How do I know if I have successfully Connected to the Active Directory or not?
mukunda charPosted Sep 30, 2008, 6:04 AM
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, 1:06 PMEdited Jan 7, 2008, 2:43 PM
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, 7:27 AM
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, 12:17 PM
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, 10:53 AM
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 19, 2006, 2:24 AM
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