Bulk create mailbox :
First search al users and filter on UPN name, to make sure you don’t use system accounts, en pipe the result to Enable-Mailbox
Get-User -RecipientTypeDetails User -Filter { UserPrincipalName -ne $Null } | Enable-Mailbox
You can also bulk mail enable multiple users :
Use this command to create a csv file for all users in the active directory, who do not have a mailbox.
Get-User | Where { $_.RecipientType -eq “User” } | select name |Out-File “C:\Scripts\not-mail-enabled-users.csv”
Edit the csv file, for all the exported users, and add an e-mail address, for each user.
The csv file shoud look like this :
Name,EmailAddress
User1,user1@domain.nl
User2,user2@domain.nl
Delete all unnecessary users in the csv file, after the export.
Create multiple Contacts by executing :
Import-CSV “C:\Scripts\not-mail-enabled-users.csv” | ForEach-Object {Enable-MailUser -Identity $_.Name -ExternalEmailAddress $_.EmailAddress}
Leave a Reply