Creating an Office 365 mailbox for an existing Active Directory user

In this scenario I have a Exchange 2013 Hybrid environment with Office 365 and 99% of the users have mailboxes in Office 365.

Creating a mailbox for an existing Active Directory user isn’t possible through the Exchange GUI using the Exchange Admin Console (EAC) and must be done through PowerShell, here is how its done.

Creating an Office 365 mailbox for a single user

If there is one user to enable then it’s relatively simple, open the Exchange Management Shell

Run a command with the following syntax:

Just change the <bold> items to those relevant to your environment

Creating an Office 365 mailbox for multiple users at once

This process generally works from by proving a bulk input to the Enable-RemoteMailbox cmdlet, this is typically a CSV file or a query with a Get-User cmdlet and piping the output into the Enable-RemoteMailbox cmdlet.

Using a query to pipe input

Open the Exchange Management Shell and run the command shown below:

What the script will do is query Active Directory and look in the OU and return all the objects which are user accounts and the pipe that into the Enable-RemoteMailbox command with the rest of the variables to provide sufficient input to the command so that the syntax is correct.

Using a CSV to provide input

This approach requires some creation of a CSV file beforehand, how you create that is beyond the scope of this document but an example CSV file is shown below:


Note: you can easily create the CSV or manage it in Excel as long as you remember to save the file as type CSV and not as default XLSX.

Use these commands:

Important: Once you have completed the steps of creating an Office 365 mailbox you must not forget to assign the user or users a license in Office 365 otherwise they will not get a mailbox and will still be unable to access any emails.

One Comment

  1. Pingback: Licensing new Office 365 users – Andy Heywood Online

Comments are closed