Announcement

Collapse
No announcement yet.

in need of a script to add ou and 2 named users.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • in need of a script to add ou and 2 named users.

    Hi All..

    This is a Very nice site with lots of good information here:}

    I am in need of a simple script that will let me create an OU and then create 2 users named you and I in that OU.

    I am using win 2000 ad.

    THanks
    Maxon.


  • #2
    Re: in need of a script to add ou and 2 named users.

    Hi, Maxon.
    I really think in your case will be better to give you the resource site. This way, if you'll need a minor adaptation of the script to your needs, you will have what it needs. The resource I use most is Microsoft's TechNet Script Center.
    Scripts to manage OUs: http://www.microsoft.com/technet/scr....mspx?mfr=true
    Scripts to manage users: http://www.microsoft.com/technet/scr....mspx?mfr=true
    Good luck.

    Sorin Solomon


    In order to succeed, your desire for success should be greater than your fear of failure.
    -

    Comment


    • #3
      Re: in need of a script to add ou and 2 named users.

      Thx that is a good site too.. i was looking for one script that does both, but i guess i can use the create ou script and the create users script together combined
      to do the same look at this and tell me what you think..

      Set objDomain = GetObject("LDAP://dc=fabrikam,dc=com")

      Set objOU = objDomain.Create("organizationalUnit", "ou=Management")
      objOU.SetInfo

      Set objOU = GetObject("LDAP://OU=management,dc=fabrikam,dc=com")

      Set objUser = objOU.Create("User", "cn=You")
      Set objUser = objOU.Create("User", "cn=I")

      objUser.Put "sAMAccountName", "You"
      objUser.Put "sAMAccountName", "I"
      objUser.SetInfo

      I will have to change the dc but do you think this will work ?

      Comment


      • #4
        Re: in need of a script to add ou and 2 named users.

        After a short read, looks like it should work. But test it (I cannot test it until after the weekend).

        Sorin Solomon


        In order to succeed, your desire for success should be greater than your fear of failure.
        -

        Comment


        • #5
          Re: in need of a script to add ou and 2 named users.

          Got it to work thanks for all your help..

          Comment

          Working...
          X