Windows 2000 Server

S

Shaun G

Hello,
I Have Just Set Up a windows 2000 server active directory domain.
The Domain Controller is "BArt"
i need to create about 400 usernames. they will be the numbers 1 throught to
400.
they need to have an home directory On The File Server "Homer".
Is There A Script or anything that is very easy to use.
Also We Want The Client machines to be win98.
i dont know if this is a problem or not.
also the log on script needs to be alternating e.g. there r 20 clients. and
we want 10 clients to connect to the "Samples" Folder On "Bart" And 10 On
"Homer"
Anny Asistance Would Be Greatly Appreciated
Thank You
Shaun
 
J

Jimmy Andersson [MVP]

The below script will populate AD with users in the specified OU.
Copy and paste the text into a file and name it <filename>.vbs

---begin---
set sArgs = WScript.Arguments

if sArgs.Count < 3 Then
wScript.Echo "Usage: " + CHR(13) + "<NumberOfUsers> <CommonPartOfName>
<inOU>"
wScript.Quit(1)
end if

Count = wScript.Arguments(0)
Name = wScript.Arguments(1)
ouName = wScript.Arguments(2)

Set Root=GetObject("LDAP://RootDSE")
defaultRoot = Root.Get("defaultNamingContext")
Set Domain = GetObject("LDAP://" & defaultRoot)

Set ou = Domain.Create("organizationalUnit", "OU=" & ouName)
ou.Put "Description", "Container that is populated by Populate.vbs"
ou.SetInfo

i = 1
do until (i = Count+1)
userName = name & i
set NewUser = ou.Create("user", "CN=" & userName)
NewUser.Put "samAccountName", userName
NewUser.SetInfo
i = i+1

Loop
---end---

Regards,
/Jimmy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top