Thursday, April 2, 2009

Create Bulk Users Exchange 2007

Several times I blog about this and tons of information available on the internet. Yet again I was asked to provide little demo to produce test users on the LAB environment. Here is the video and the simple instructions to get the work done

image Here is the video if you like to download it

1..10 | ForEach { Net User "Hr$_" MyPassword=01 /ADD /Domain;Enable-Mailbox "HR$_" -Database SG1-MB1 }

Couple things need to be modified here,

First the above PS command will create 10 users if you like to change the number of users change this accordingly

  1. 1..10  lets say to 1..100 now it will create 100 users
  2. “User$ ( change this whatever name you like to use for the test users, so if I want to create users called HR I would do as below

1..10 | ForEach { Net User "Hr$_" MyPassword=01 /ADD /Domain;Enable-Mailbox "HR$_" -Database SG1-MB1 }

Above one liner PS will create 10 users called HR, and don't forget my database name is SG1-MB1 so you will have to change to your own. If you do not know what it is, open EMS (Management Shell)

Get-mailboxDatabase  ( as you see below the name is SG1-MB1)

image

Once you happy with number of users will CMDlet create and you also happy with user name and modified the mailbox database name according to yours copy and paste the above into EMC

Oz Casey Dedeal

MVP (Exchange)
MCITP (EMA), MCITP (SA)
MCSE 2003, M+, S+, MCDST
Security+, Project +, Server +

http://smtp25.blogspot.com (Blog)
http://telnet25.wordpress.com/ (Blog

2 comments:

Anonymous said...

What is the point of this though? Meaning why would you ever want to create that many user's when they aren't using their names?

Oz Casey Dedeal said...

testing purposes, if you have LAB you will need users to test many different senarios or futures before it goes out the production

best
oz