Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Mass create users in exchange 2003

Posted on 2006-11-18
20
Medium Priority
?
281 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
  • +2
20 Comments
 
LVL 57

Accepted Solution

by:
Pete Long earned 172 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:Irwin Santos
Irwin Santos earned 164 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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
 
LVL 23

Assisted Solution

by:Stacy Spear
Stacy Spear earned 164 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:Irwin Santos
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:Irwin Santos
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:Irwin Santos
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

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
In this video we show how to create a mailbox database 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 Servers >> Data…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

636 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