Create an csv file with the necessary information across the top row of the file as such:
The top row is going to coordinate with the S_.value that you are going to use in the following Exchange Shell command:
Import-CSV “C:Mailboxes.csv” | foreach {new-mailbox –Name $_.name –Alias $_.alias –UserPrincipalName $_.userprincipalname –Database $_.Database –OrganizationalUnit $_.organizationalunit –password (ConvertTo-SecureString $_.password –AsPlainText –force)}
And you should see the mailbox’s created below:
That’s it. You can see how the values map with their respective column names. You can add as many users as you want, and change it so they go to different database’s.
You can even create an automated job to export from your production servers, and them import them to your DEV Exchange Servers for testing.