Powershell to create the Mass mailboxes in Exchange 2007 orginisation from CSV input file. Below is the CSV file format which need to have the following header and details in the below mentioned format
Csv Format
Firstname, Lastname,Aliasname,Database,OUPath
Krishna, kumar,krishnakumar,server\storagegroup\store,Users
Below is the powershell script to create the mass mailbox by reading the csv file and and create the mailbox. First it take the password as input and reads the csv file and create the mailbox with the information in the csv file
$Password=Read-Host “Enter Password” -AsSecureString
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
}
Hi, i wanted to ask if this is applicable to Exchange 2010 and if so the format for this script is to use the password of the person logged in try to execute or a potential password for the accounts to be created?
Hi, You should be able to use in Exchange 2010, i dont see any problem with it.
Password is the password of the accouts to be created.
Regards,
Krishna