Re: Create Multiple Accounts



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.


.



Relevant Pages

  • Re: AD Domain Question
    ... You have equal user accounts in the Root domain and in the Child domain? ... sounds like these resources don't have permissions to the Child domain ...
    (microsoft.public.windows.server.active_directory)
  • Re: User accounts in the ROOT
    ... We have our ROOT domain and 10 child domains. ... Child domain admins will be able to manage groups and GPOs, but not create or modify standard user accounts. ... They will be able to add and remove group members as needed. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Parent/Child domain accounts and Exchange.
    ... Ho do I move a user account from the parent domain to ... > modifying recipient polices in Exchange. ... >> We've just added a child domain to our windows 2000 AD. ... Is there a way to move some of our user accounts from the ...
    (microsoft.public.win2000.active_directory)
  • Re: Questions regaring Exchange and multiple forests
    ... rather set them up as a child domain or a seperate domain all together. ... So is it possible for them to manage their own user accounts from their ... I had suggested the RPC over HTTPS option to the seniors here but they seem ... if it is possible to have them manage their own exchange accounts while ...
    (microsoft.public.exchange.design)
  • Re: Outlook name resolution within AD child domains
    ... Do you have a RUS for each child domain? ... All user accounts will be in the child ... the root domain will be used as a resource domain only. ... > root forest domain, it resolves fine. ...
    (microsoft.public.exchange2000.admin)