Creating user in AD with ADSI 
Author Message
 Creating user in AD with ADSI

Hi!

I'm new to VB.NET and have a (simple?) question...

I need to add a user to the local SAM or AD.

I wrote the following code, but .NET says the CommitChanges() Function is
not implemented.
Can somebody help me out with this?

Thanx

Jan Wrage

Code:
Imports System.DirectoryServices

Public Class Form1

Inherits System.Windows.Forms.Form

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim mytest As New System.DirectoryServices.DirectoryEntry("WinNT://jan")

Dim test = "test"

mytest.Children.Add(test, "user")

mytest.CommitChanges()

End Sub

End Class



Sun, 21 Aug 2005 07:52:35 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. How to Create user using AD?

2. Create AD user account

3. create user on AD server

4. Creating NT User accounts using ADSI (WinNT:) within VB.Net

5. ADSI create user, Terminal MST strange problem.

6. ADSI/Create User

7. Querying AD via ADSI (ASP3, IIS5)

8. Modify AD key fields programmatically via ADSI or VB Script

9. Setting userproperties with ADSI in AD

10. Error connecting to AD using ADSI and LDAP on NT4

11. Add user to group in AD

12. AD User Management

 

 
Powered by phpBB® Forum Software