Solved

Mass create users in exchange 2003

Posted on 2006-11-18
20
269 Views
Last Modified: 2010-03-06
I need to create a couple thousand users for testing on my exchange 2003 server.  Does anyone know of a script or a program that I can use to make thousands of users?
0
Comment
Question by:Lysandus
  • 4
  • 4
  • 3
  • +2
20 Comments
 
LVL 57

Accepted Solution

by:
Pete Long earned 43 total points
ID: 17971324
Create Users Script

This script was written by user "Jumble" in Q_20678555

It will create 1000 active directory users named UserNo1, UserNo2 etc
Script Code
Cut below
============================================
Set objRootDSE = GetObject("LDAP://rootDSE")
Set objContainer = GetObject("LDAP://cn=Users," & _
                            objRootDSE.Get("defaultNamingContext"))

For i = 1 To 1000
   Set objLeaf = objContainer.Create("User", "cn=UserNo" & i)
   objLeaf.Put "sAMAccountName", "UserNo" & i
   objLeaf.SetInfo
Next
WScript.Echo "1000 Users created."
=============================================

This will create as many  users as you want edit as needed remember to save this as a .vbs file for it too work
0
 
LVL 30

Assisted Solution

by:irwinpks
irwinpks earned 41 total points
ID: 17971327
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 17971336
once you have then created - open active direcotry users and computers > users > select them all

Right click them > enable
Right click them > Exchange Tasks > Create mailbox

go and have a coffee

When you come back log in as the domain administrator - open outlook {or outlook web access} and send a blank email to each oth these users (select them all fromt he global address list)

now look in exchange system manager and you will have 1000 mailbox's
0
 
LVL 1

Author Comment

by:Lysandus
ID: 17971401
For that script, is the password set blank or something else?
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 17971528
blank :)
0
 
LVL 1

Author Comment

by:Lysandus
ID: 17971535
Do you know how I can modify the script to set the password to something specific?
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 17971591
not modify that script but - once you hace created your users move them to an OU Called TEST then

' StudentPwd.vbs
' Example VBScript to change a user's password
' Version 2.0 - August 2005
' ---------------------------------------------------------'
Option Explicit
Dim objOU, objUser, objRootDSE
Dim strContainer, strDNSDomain, strPassword
Dim intCounter, intAccValue, intPwdValue

' --------------------------------------------------------'
' Note: Please change OU=nowhere, to reflect your domain
' --------------------------------------------------------'
strContainer = "OU=TEST, "
strPassword = "H0l1d@y$"
intAccValue = 544
intPwdValue = 0
intCounter = 0
' -------------------------------------------------------'
' Makes the user change H0l1d@y$ password at first logon
' -------------------------------------------------------'

Set objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("DefaultNamingContext")
strContainer = strContainer & strDNSDomain
set objOU =GetObject("LDAP://" & strContainer )

For each objUser in objOU
If objUser.class="user" then
objUser.SetPassword strPassword
objUser.SetInfo
objUser.Put "pwdLastSet", intPwdValue
objUser.SetInfo

objUser.Put "userAccountControl", intAccValue
objUser.SetInfo
intCounter = intCounter +1
End if
next

WScript.Echo strPassword & " is Password. UserAccountValue = " _
& intAccValue & vbCr & intCounter & " accounts changed"
WScript.Quit

' End of change password example VBScript


Sets all the passwords to H0l1d@y$

Ref http://www.computerperformance.co.uk/ezine/ezine83.htm
0
 
LVL 1

Author Comment

by:Lysandus
ID: 17971634
Awesome, I'll give this a try.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 23

Assisted Solution

by:Stacy Spear
Stacy Spear earned 41 total points
ID: 17974831
If you are stress testing the server, use JetStress from Microsoft. A couple of thousand users without mail flow or disk IO won't stress a a good server at all.


http://www.microsoft.com/downloads/details.aspx?FamilyID=94b9810b-670e-433a-b5ef-b47054595e9c&DisplayLang=en
http://www.microsoft.com/downloads/details.aspx?FamilyId=773AE7FD-860F-4755-B04D-1972E38FA4DB&displaylang=en
(this one can be dangerous but I love it on a test bed) http://www.microsoft.com/downloads/details.aspx?FamilyID=92eb2edc-3433-47ca-a5f8-0483c7ddea85&DisplayLang=en
0
 
LVL 30

Expert Comment

by:irwinpks
ID: 18136645
@redseatechnoloiges...you need to include me in the split as I provided a valid link to the question being asked...within the above link the direction was to "look at the links below"..specifically "Read the details on Visual Scripting".  The contents within describe with illustration how to accomplish what was asked in the original question.
0
 
LVL 30

Expert Comment

by:irwinpks
ID: 18136648
@redseatechnoloiges...oh yeah... please :-)
0
 
LVL 39

Expert Comment

by:redseatechnologies
ID: 18136670
I did see that, but thought that a commercial solution was not required (and not what the asker went for in the end anyway).

The reason I included darkstar in the split was because she (i think I got that right) gave other links for stress testing.

If it wasn't going to be a split between those two, it was going to be a direct accept to Pete.

Although, I can see that the asker did ask for either a script _or_ a program, so I will leave the decision up to the attending mod.

-red
0
 
LVL 30

Expert Comment

by:irwinpks
ID: 18136708
@redseatechnoloiges...well, I saw program and that was my focus.
0
 
LVL 23

Expert Comment

by:Stacy Spear
ID: 18137668
Red, I'm a HE! :)

True, asker did ask for a script but reading into his question, it seems that he was trying to ensure a new server was good enough to keep his pay check coming in. And jetstress and IOMeter (available at Sourceforge) does stress a disk subsystem, while the others stress all the components.

Hopefully, the asker would resolve the question before the mods do, then irwinpks, the right choice is made for accepted answer. I see lots of mod closed questions that I feel I should have gotten the points but didn't. Its just too much cleanup work to be done for every question to be closed properly when the asker abandons it.
0
 
LVL 39

Expert Comment

by:redseatechnologies
ID: 18137701
>>Its just too much cleanup work to be done for every question to be closed properly when the asker abandons it.

You have no idea.  I spent 5 hours going through it today...
0
 
LVL 23

Expert Comment

by:Stacy Spear
ID: 18137713
I had some idea, my inbox full of redsea comments! Got to commend you, I never have the time to spend that much on EE.
0
 
LVL 39

Expert Comment

by:redseatechnologies
ID: 18137735
Lol, yeah, think about what Sembee got when he woke up :))

Anyway, lets try to keep on topic so that we don't upset the mod!

-red
0

Featured Post

Free book by J.Peter Bruzzese, Microsoft MVP

Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Outlook not able to send emails with attachments greater than 3MB 9 48
exchange 6 32
EXCHANGE 6 23
Exchange 2013 Errors 2 20
Easy CSR creation in Exchange 2007,2010 and 2013
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
This video discusses moving either the default database or any database to a new volume.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now