Skip to content

Creating bulk Mailboxes in Exchange Server 2013.

July 11, 2014

Need to create hundred or thousand of users for Exchange 2013?

First, create a csv with following field

Name,alias,userprincipalname,designation,organizationalunit,database,password

andrew lum,andrewlum,andrewlum@fb.com,CEO,Board,mailboxdb1,Pasqwe@123


Next, create a powershell script, save it as ps1 format :

$bulk = Import-CSV test.csv
foreach ($_ in $bulk)
{
$name=$_.name
$alias=$_.alias
$upn=$_.UserPrincipalName
$db=$_.Database
$ou=$_.organizationalunit
$encryptedpass = convertto-securestring $_.password -asplaintext -force
$resetpass = $false
new-mailbox -Name $name -Alias $alias -UserPrincipalName $upn -Database $db -OrganizationalUnit $ou -Password $encryptedpass
Set-User $_.alias -Title $_.designation
}


Finally, open a exchange shell and run the ps1 script.

How you edit the field is up to you, depend on your organization, in my example, I created a “Title/designation” field.

 

 

 

 

Advertisements

From → Exchange 2013

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: