Computing.Net > Forums > Programming > Using VBScript to create an account

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Using VBScript to create an account

Reply to Message Icon

Original Message
Name: Minki
Date: June 6, 2007 at 00:22:25 Pacific
Subject: Using VBScript to create an account
OS: Microsoft Windows 98/XP
CPU/Ram: 350 MHz / 64 MB SDRAM
Model/Manufacturer: Compaq Presario 1670
Comment:

Could someone please tell me what script to use to create an account with a password on Active Directory? Or refer me to a site that can tell me? Thanx in advance!

Life is but a dream ...


Report Offensive Message For Removal


Response Number 1
Name: Razor2.3
Date: June 6, 2007 at 22:10:47 Pacific
Reply: (edit)

Disclaimer: I don't have an AD setup here, so I can't test these scripts, but they are built off of MS' examples.

Save as whatever.vbs:

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

With oContainer.Create("User", "cn=NewUser")
.oUser.Put "SAMAccountName", "NewUser"
.SetPassword "NewUserPass"
.SetInfo
End With


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home








Do you have your own blog?

Yes
No
I did before
I will soon


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge
Poll History




Data Recovery Software