TechShizz | Bulk Mailbox Creation

Bulk Mailbox Creation

CSV template for this script is attached to this post named "Template.xls"

 

To create mailboxes all with the same password:

$database = Get-MailboxDatabase

$Password=Read-Host “Enter Password” –AsSecureString

 

Import-CSV CreateMailboxes.csv | ForEach {New-Mailbox -Alias $_.alias -Name $_.name -userPrincipalName $_.UPN -Database $database -OrganizationalUnit Users -Password $Password} -ResetPasswordOnNextLogon $true

 

 

To create mailboxes with custom passwords:

 

Import-CSV D:\Scripts\Bulk Mailbox Creation\users.csv | ForEach {New-Mailbox -Alias $_.alias -Name $_.name -userPrincipalName $_.UPN -Database “Mailbox Database” -OrganizationalUnit Users -Password

(ConvertTo-SecureString $_.password -AsPlainText -Force)}

Template.xlsx (10.7KB)

Add comment