Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hey, Every couple of months we have to create 30+ accounts so I was wondering what's the best way to bulk-create the accounts and their mailboxes.

We have AD on 2003 and Exchange 2007.

share|improve this question
add comment

1 Answer

The easiest way is to get your new user information in a spread sheet with the following columns:

Firstname, Lastname,Aliasname,Database,OUPath

The OUPath is in the format of server\storagegroup\mailbox store

Then, use powershell to import the CSV file and create the users:

First thing you will need to do is create a password that will be used for each account (obviously you can see this so the user has to change it on logon).

$Password=Read-Host “Password” -AsSecureString

Then import the CSV file and loop through it

Import-CSV C:\CreateNewmailbox.csv |
foreach {
$userprincipalname = $_.Firstname + “.” +  $_.Lastname + “@domain.com”
new-mailbox -name $_.name -alias $_.alias -FirstName $_.Firstname -LastName $_.Lastname -userPrincipalName  $userprincipalname -database $_.Database -OrganizationalUnit  $_.OUpath -Password $Password
}
share|improve this answer
    
Thank you Sam. This looks good, but what other attributes can I add? And please explain some more about the creating the password and the Database attribute. –  Abdullah Nov 22 '10 at 5:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.