If you decide to implement an Exchange Server in your organization it can be a very monotonous work to create mailboxes for all users in a given OU one by one via the EAC web interface. But its much easier to let the PowerShell do the work for you!
The script does nothing else than filling the variable $users with all accounts in the given OU which have an entry in the „name“ AD-attribute.
Then it will fill the variable $user with an entry from $users and create a mailbox. This will be repeated until all entries from $users have been read.
Tipp: Before running the script make sure that all AD Accounts in that OU are filled with the needed data (first and last name and so on) and check the correct format of your email address policy. That way you’ll significantly reduce your work.
The complete process can be automated with a tine script in PowerShell:
$users = Get-ADUser -LDAPfilter '(name=*)' -searchBase "OU=something,DC=contoso,DC=local"
foreach($user in $users)
Enable-Mailbox -Identity $user.SamAccountName