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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Using VBScript to create an account

Reply to Message Icon

Name: Lithium (by Minki)
Date: June 6, 2007 at 00:22:25 Pacific
OS: Microsoft Windows 98/XP
CPU/Ram: 350 MHz / 64 MB SDRAM
Product: 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 ...



Sponsored Link
Ads by Google

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

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


0
Reply to Message Icon

Related Posts

See More







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


Sponsored links

Ads by Google


Results for: Using VBScript to create an account

Batch to create an incremented fold www.computing.net/answers/programming/batch-to-create-an-incremented-fold/16805.html

Creating a DSN using VBScript www.computing.net/answers/programming/creating-a-dsn-using-vbscript/1902.html

VBscripting to create folders www.computing.net/answers/programming/vbscripting-to-create-folders/13391.html