TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mark
NA
3
0
VB.NET to Active Directory (What am I missing here?)
Nov 24 2006 1:56 PM
Hello:
I was hoping for a bit of help. When I click on a button I want it to add a test user to Active Directory. The code debugs with
no errors,
but the user never shows up on my active directory list (intranet.merge3d.com\Users). All help is greatly appreciated!
Private
Sub
btnExport_Click(
ByVal
sender
As
System.Object,
ByVal
e
As
System.EventArgs)
Handles
btnExport.Click
Dim
newUser
As
DirectoryEntry
Dim
de
As
DirectoryEntry =
New
DirectoryEntry(
"LDAP://mcws2003.intranet.merge3d.com/CN=users;DC=intranet,DC=merge3d,DC=com"
)
newUser = de.Children.Add(
"cn=Student Smith"
,
"user"
)
newUser.Properties(
"sAMAccountName"
).Add(
"Student_Smith"
)
de.CommitChanges()
MessageBox.Show(
"User Added"
)
End
Sub
Reply
Answers (
1
)
.NET posters
try-and-catch