PC Review Forums Newsgroups Windows 2000 Microsoft Windows 2000 Deployment Re: Mass user script

Reply

Re: Mass user script

 
Thread Tools Rate Thread
Old 30-06-2003, 07:56 PM   #1
Johan Arwidmark
Guest
 
Posts: n/a
Default Re: Mass user script


create a simple vbscript like:

Set objRootDSE = GetObject("LDAP://rootDSE")
Set objContainer = GetObject("LDAP://cn=Users," & _
objRootDSE.Get("defaultNamingContext"))

For i = 1 To 1000
Set objLeaf = objContainer.Create("User", "cn=UserNo" & i)
objLeaf.Put "sAMAccountName", "UserNo" & i
objLeaf.SetInfo
Next
Wscript.Echo "1000 Users created."

regards
Johan Arwidmark

On Sun, 29 Jun 2003 16:44:19 -0700, "Cary Shultz"
<cary90240@hotmail.com> wrote:

>
>>-----Original Message-----
>>I know there is a script that allows you to add multiple
>>new users in a generic name like Term1, Term2, etc. Can
>>anyone tell me the script path or what needs to be done

>to
>>do such a thing, they dont need to be passworded either,
>>very basic accounts. Thanks Guys!
>>.

>ADDUSERS would be a great choice. It has the advantage of
>allowing you to specify passwords. Essentially, you just
>need to populate the first three fields.
>
>LDIFDE would be another great choice. However, you can
>not specify passwords with LDIFDE.
>
>Yet another choice would be CSVDE, which would be the way
>to go if you have an excel speadsheet with all of the
>information already.
>
>HTH,
>
>Cary


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off