Re: Create Multiple Accounts
- From: "Babu VT" <babuvt@xxxxxxxxxxxxx>
- Date: Thu, 27 Jul 2006 18:19:25 +0530
Hi Sam,
Check this out
http://www.activexperts.com/activmonitor/windowsmanagement/adsi/samples/#file006.htm
rgds
Babu
"Sam" <Sam@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:40C9E836-3859-474F-8649-425F742E9D7E@xxxxxxxxxxxxxxxx
I'm trying to create multiple accounts in an OU called 'Visitors' in a
child
domain called sub.local.net bit I'm not entirely sure how to call up the
child domain. I'm working with:
Set objRootDSE = GetObject("LDAP://rootDSE")
Set objContainer = GetOject("LDAP://cn=Visitors," &_
objRootDSE.Get("defaultNamingContext"))
For i = 1 To 125
Set objLeaf = objContainer.Create("User", "cn=GuestAcc" & i)
objLeaf.Put "SAMAccountName", "GuestAcc" & i
objLeaf.SetInfo
Next
WScript.Echo "125 User accounts created"
Also, I'd like to be able to set the account password & Home directory if
possible. If anybody with a little more experience could shed some light
on
this, pointing me in the right direction or direct me to somewhere with
some
documentation covering the basics of AD scripting I'd be much
appreciative.
Cheers.
.
- Follow-Ups:
- Re: Create Multiple Accounts
- From: 1337squirrel
- Re: Create Multiple Accounts
- Prev by Date: Re: Retrieve attributes from Active Directory
- Next by Date: Re: chop right of the decimal point
- Previous by thread: Re: Retrieve attributes from Active Directory
- Next by thread: Re: Create Multiple Accounts
- Index(es):
Relevant Pages
|