We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Public Function Create_User(ByVal deOU_To_Hold_User As System.DirectoryServices.DirectoryEntry, ByVal strSAM_ACCT As String) As System.DirectoryServices.DirectoryEntry Dim deNew_User As DirectoryServices.DirectoryEntry Dim deUsers_In_OU As DirectoryServices.DirectoryEntries Try deUsers_In_OU = deOU_To_Hold_User.Children deNew_User = deUsers_In_OU.Add(strSAM_ACCT, "User") deNew_User.Properties("SAMAccountName").Add(strSAM_ACCT) deNew_User.CommitChanges() Create_User = deNew_User Catch ex As Exception mstrErrorText = ex.Message Create_User = Nothing End Try End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.