General discussion

Locked

DOWNLOA Create Active Directory users and Exchange accounts with VBScript

By Bill Detwiler Editor ·
Creating users and Exchange accounts can be tedious, especially when user information already resides in your company's HR system. Instead of manually creating an Active Directory user and Exchange account, you can use a script that accomplishes the same goal. This handy, VBScript will create users with passwords in Active Directory in the Users container and an Exchange account. During the process it creates an output log that provides you with three information points for each account that is created:

Whether or not the Active Directory user account itself was created;
Whether or not the password was set successfully and the account enabled;
Whether or not the application of Exchange attributes was successful.

If these is a failure in one of these three areas, the error number and, if available, the error description will be written to the log file along with the current date and time.

Download the VBScript:
http://techrepublic.com.com/5138-10877-6026861.html

Join this ongoing discussion and let us know if this script is helpful and if there's anything we can do to improve the download's format or content.

This conversation is currently closed to new comments.

22 total posts (Page 1 of 3)   01 | 02 | 03   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Echo and shell not working with this script

by stevenwells99 In reply to DOWNLOAD: Create Active D ...

Hi,

I have downloaded and modified this script and pleased to say its working well.

However, I was wondering why I can't get wscript.echo to work or to call a shell within this script.

Am I missing something, all looks good to me.

Collapse -

Problems

by rahay In reply to DOWNLOAD: Create Active D ...

I have Dl'ed teh script, made teh suggested changes, named my csv file example.csv,
Sample of teh CSV:
sLogon sFirstName slastName sDisplayName sPassword
rsuzuki Ryuichi Suzuki Ryuichi Suzuki Pa$$w0rd
vflint Vasili Flint Vasili Flint Pa$$w0rd


But when I get to Line 93:

oInputRecordSet.open "SELECT * FROM " & sCSVFile,oInputConnection

I get an error
Line: 93
Char: 1
The connection cannot be used to perform the operation. It is either closed or invalid in this context.
Code: 800A0E70
Source: ADODB Recordset

Any help very appericated

Reg
West Palm Beach Fl

Collapse -

by stevenwells99 In reply to Problems

Is the .csv file in the correct location and correctly formatted?
Each value should be seperated by comma, for example
rsuzuki,Ryuichi,Suzuki,Ryuichi,Suzuki,Pa$$w0rd

Also check your values line up with the statement.
Suggest you stick with defaults first then edit to include display name value.

hope this helps ;_)

Collapse -

Think It's ODBC Problems

by rahay In reply to

Steven, thanks, I think I do not have the ODBC drivers set up correctly. The CSV file is comma separated. The Display name was Dim'ed, so I assumed it was used?

I am convinced it is something in the ODBC setup. I did not have any drivers listed and the Jet... option is not in my select list...

Any help is appreciated.

Cheers

Collapse -

Exchange Error 2147016657

by RacerxV6 In reply to Problems

Well the scripte worked for creating the users, however I got his error and none of the Exchange accounts were created. I followed the directions of using the CVSDE -f exchattribs.csv in order to extract and locate the msExchHomeServerName? and ?homeMDB
infor that needs to be replaced in the script. Not really a big deal only 25 corporate users. Just wanted to know for future use.

Thanks,
Matt

Collapse -

Exchange Error 2147016657

by anthony.white1979 In reply to Exchange Error 2147016657

I had the same error and the simple fix for me was, i had mistyped one of the sLDAPhomeMDB field entries!

Collapse -

excelent work ->next phaze =Gui

by luminoss In reply to DOWNLOAD: Create Active D ...

Wouldnt it be great if this work would be wraped up in a gui , thus making the administrator ,
browse for the csv file -
write the Domain in a dialog box
choose with check boxes if the password is Null , can be changed at next logon, never expire etc.
open to view & verify csv columns before importing the users.
more options i am sure can be implemented!
who can/will peek up the this project and make it real ;-)

Collapse -

error 424

by tself In reply to DOWNLOAD: Create Active D ...

I've gone through this for hours, i keep getting this error in the log and the accounts are not created:

fbloggs: Error creating account: 424Object required

Anyone have any ideas of a solution to this?
Running on a Windows 2003 SBS server by the way.

Thanks

Collapse -

Experiencing the same problem... help

by hughesfn In reply to error 424

I am experiencing the same error. Has there been a resolution???

Help!!!

Thanks

Collapse -

CSV layout

by fredobas In reply to Experiencing the same pro ...

Open you excel applic.
On the first line, write the 4 title row
On the second and next line, complete the fields.
Save the file as CSV
Regards

Back to IT Employment Forum
22 total posts (Page 1 of 3)   01 | 02 | 03   Next

Related Discussions

Related Forums