Create User in Active Directory
You can create a new user in Active Directory with this code.
VB Code:
Dim adObj As Object
Dim adUser As Object
Set adObj = GetObject("WinNT://Domain")
Set adUser = adObj.Create("user", "RobDog888")
adUser.SetInfo
Set adUser = Nothing
Set adObj = Nothing
Re: Create User in Active Directory
RobDog,
you are like my savior! Hey, i did find a script to get 'User Name' from AD, but how to get User ID from AD? (Windows 2003 Server). This question is for Classic VB6.0.
Ankeet
Re: Create User in Active Directory
Hi guys.
This code fails if Option Strict is switched on.
Any ideas on how to change this so it works with option strict
Cheers
Re: Create User in Active Directory
This code works for VB 6 but could be converted for .net use.
Give me a minute.
Re: Create User in Active Directory
Thanks mate look forward to seeing the code.
Thanks again
Re: Create User in Active Directory
Hi mate did you ever get around to moving this over to vb.2005?
Re: Create User in Active Directory
No I havent as my server has been down for a while now (hardware parts need replacing) so I dont have a system running AD to test on.