Discussion Locked

Add users

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi !
How I can Add users from text file to AD,
including OU.

Best regards,
Alex
talex@rafael.co.il

5 replies

by lastsurvivor

You need to obtain a copy of windows scripting host from Microsoft at www.microsoft.com you are looking for the most reason versions of ADSI and Windows script host. 1. Create a new Dir to store the files. 2. Dowload and install ADSI and WSH to the new dir. 3. Start|Run "Cscript scriptfile.vbs" 4. Scriptfile.vbs is the name of a file that contains the following enteries.
On Error Resume Next
Set Root = GetObject("LDAP://" $ Root.Get ("DefaultNamingContext"))
Set User = DomObj.Create("user:, "CN=fullname")
User.samAccountname ="Name"
User.SetInfo

Name is the name of the user account, and Fullname is the user's Full name

This discussion is closed to new replies.