Geez Thanks OK Here it is:
Dim strPath As String = "WinNT://" & local_Computer_name
' Create a new 'DirectoryEntry' with the given path.
Dim myDE As New System.DirectoryServices.DirectoryEntry(strPath)
Dim myEntries As System.DirectoryServices.DirectoryEntries = myDE.Children
' Create a new entry 'Sample' in the container.
Dim myDirectoryEntry As System.DirectoryServices.DirectoryEntry = myEntries.Add(newuser, "User")
' Save changes of entry in the 'Active Directory'.
Dim TmpObj As Object = myDirectoryEntry.Invoke("SetPassword", newpass)
myDirectoryEntry.CommitChanges()
|