Exchange 2007 – Create Multiple Mailboxes using Powershell

Last updated on March 30th, 2023 at 05:10 pm

Read Time:1 Minute, 15 Second

We were recently setting up a test lab with an old version of Exchange 2007 to replicate a customers environment and we had created the required 250 users in Active Directory using some scripts but we also had to then create the mailboxes for these accounts.

Not wanting to sit there manually creating all these mailboxes, we used a quick Powershell command that had it done in 30 seconds.

All you need to do is to run the following command in your Exchange Management Shell:

Get-User -OrganizationalUnit “LAB/Users” | Where-Object{$_.RecipientType -eq “User”} | Enable-Mailbox -Database “LABMBX\MBX1”


  • “LAB/Users” – The OU you want to enable the mailboxes on
  • “LABMBX\MBX1” – your Exchange database where you want to create the mailboxes on

You can also add further parts to your command to scale down the search for users based on Company or Department etc. To this, just add it to the “Where-Object” part – so an example:

Get-User -OrganizationalUnit “LAB/Users” | Where-Object{$_.RecipientType -eq “User” -and $_.department –eq “Sales” -and $ -eq “Lab Company”} | Enable-Mailbox -Database “LABMBX\MBX1”

Just change the Sales and Lab Company to whatever you require.

Once you have run this command you should check in your Exchange Management Console and you should then see all the mailboxes that have been created for you.


If you have any feedback or queries on this guide, please leave us a message below and we will get back to you when we can.

Click to rate this post!
[Total: 0 Average: 0]
Avatar for Andrew Armstrong

About Post Author

Andrew Armstrong

Founder of TechyGeeksHome and Head Editor for over 15 years! IT expert in multiple areas for over 23 years. Sharing experience and knowledge whenever possible! Making IT Happen.

Free Subscription

If you want to be notified when we post more quality guides like this one, sign up to our free subscription service and you will receive an email when a new post is live.

Join 6,258 other subscribers.

No need to worry, we will not be filling your inbox with spam and you can unsubscribe anytime you like.

Leave us a message...

This site uses Akismet to reduce spam. Learn how your comment data is processed.