Direct Inward Dialing: +1 408 916 9393
Exchange Online mailboxes give employees and teams access to email, calendars, and contacts in Microsoft 365. This guide explains how to create user and shared mailboxes using PowerShell, the Microsoft 365 admin center, and ManageEngine ADManager Plus.
A regular user mailbox isn't created by a standalone command; it is created as a result of license assignment. When a Microsoft 365 user account is assigned a license that includes Exchange Online, the service provisions the mailbox automatically, usually within minutes. So the real task for a user mailbox is creating the account and assigning the right license, not running New-Mailbox.
A shared mailbox is different: it has no primary user and doesn't require a license if it remains within the applicable size limit, so you create it directly with the New-Mailbox -Shared cmdlet. The New-Mailbox cmdlet is therefore the right tool for shared, room, and equipment mailboxes, and the licensing route is the right one for user mailboxes.
Install-Module -Name ExchangeOnlineManagement
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName admin@zylker.onmicrosoft.com
A shared mailbox is a natural fit for PowerShell's New-Mailbox cmdlet. Use the -Shared switch with a name, display name, and alias:
New-Mailbox -Shared -Name "Sales Department" -DisplayName "Sales Department" -Alias sales
After creating a shared mailbox, grant the team access to it. Add-MailboxPermission gives Full Access, and Add-RecipientPermission grants Send As permission, so members can send emails from the shared address:
Add-MailboxPermission -Identity "Sales Department" -User "jbond@zylker.com" -AccessRights FullAccess
Add-RecipientPermission -Identity "Sales Department" -Trustee "jbond@zylker.com" -AccessRights SendAs
The same cmdlet creates room and equipment mailboxes with the -Room and -Equipment switches for resource scheduling.
For a user mailbox, the supported approach is to create and license the user, which provisions the mailbox. You can do this in the admin center as shown below, or with the Microsoft Graph PowerShell Set-MgUserLicense cmdlet to assign a license to an existing user:
Set-MgUserLicense -UserId "jbond@zylker.com" `
-AddLicenses @{SkuId = "<exchange-or-m365-sku-id>"} -RemoveLicenses @()
An alternative legacy method uses the New-Mailbox -MicrosoftOnlineServicesID cmdlet, which creates the user and mailbox together but leaves the account unlicensed:
New-Mailbox -Name "James Bond" -DisplayName "James Bond" `
-MicrosoftOnlineServicesID jbond@zylker.com `
-Password (Read-Host -AsSecureString "Enter password")
If you use this method, ensure you assign an Exchange Online license within 30 days or the account may be disabled. For new deployments, creating a licensed user is the cleaner path.
For an existing cloud user with no mailbox, assigning an Exchange Online license automatically provisions a mailbox. The hybrid case is different; when the user account is mastered in on-premises Active Directory and synced to the cloud by Microsoft Entra Connect (formerly Azure AD Connect), you create the cloud mailbox from on-premises Exchange with Enable-RemoteMailbox, which is run in the on-premises Exchange Management Shell:
Enable-RemoteMailbox -Identity "James Bond" `
-RemoteRoutingAddress "jbond@zylker.mail.onmicrosoft.com"
This stamps the on-premises account with the attributes that tell Exchange Online to create a mailbox for it. The change takes effect after the next Entra Connect synchronization and the required license assignment. Creating the mailbox directly in the cloud for a synced user isn't supported, because the on-premises directory is authoritative for those accounts.
Shared mailboxes are the common bulk-creation case, since user mailboxes are usually provisioned by licensing. Prepare a CSV with Name, DisplayName, and Alias columns, and loop through its rows with New-Mailbox -Shared:
Import-Csv "C:\Imports\shared-mailboxes.csv" | ForEach-Object {
New-Mailbox -Shared -Name $_.Name -DisplayName $_.DisplayName -Alias $_.Alias
}
For a batch of user mailboxes, the equivalent is to create and license the user accounts in bulk, from the admin center's bulk option, PowerShell license assignment, or ADManager Plus. The mailboxes are then provisioned automatically.
The parameters and cmdlets below are used for creating Exchange Online mailboxes.
| Parameter | Description |
|---|---|
| -Shared | Creates a shared mailbox, which requires no license if it remains within the applicable size limit |
| -Room | Creates a room mailbox |
| -Equipment | Creates an equipment mailbox |
| -Name | Specifies the mailbox's name |
| -DisplayName | Specifies the name displayed in address lists |
| -Alias | Specifies the mailbox's email alias |
| -MicrosoftOnlineServicesID | Specifies the user's sign-in name (UPN) in the legacy user-mailbox creation syntax |
To create a user mailbox in the Microsoft 365 admin center, add a user and assign a license that includes Exchange Online. The mailbox is then provisioned automatically.
The same applies to an existing user who has no mailbox: Assign them an Exchange Online license and the mailbox is created.
ADManager Plus is a unified AD, Exchange, and Microsoft 365 management and reporting tool that can create a user and provision its Exchange Online mailbox as part of the same workflow, assigning the license at the same time, from a point-and-click console with no scripting.
ADManager Plus replaces scripts and one-off portal work with a single console for AD, Microsoft 365, and Exchange management and reporting:
This is the most common hybrid pitfall: An admin creates the AD user on-premises and assigns a Microsoft 365 license, but the mailbox doesn't provision correctly because the account's Exchange attributes were never set. The fix is to create the user in on-premises AD without email attributes, then run Enable-RemoteMailbox on-premises so the attributes are stamped and Entra Connect provisions the cloud mailbox on the next sync.
PowerShell (run in the on-premises Exchange Management Shell):
Enable-RemoteMailbox -Identity "James Bond" `
-RemoteRoutingAddress "jbond@zylker.mail.onmicrosoft.com"
Then force the directory sync from the Entra Connect server rather than waiting for the scheduled cycle, and assign the license:
Start-ADSyncSyncCycle -PolicyType Delta
For a user mailbox, license the user, and the mailbox is provisioned automatically. For a shared mailbox, create it directly by running this command:
New-Mailbox -Shared -Name "Support" -DisplayName "Support" -Alias support
Resource mailboxes let people book meeting rooms through Outlook. In PowerShell, run:
New-Mailbox -Room -Name "Conference Room 1010" -Alias confroom1010
Create a shared mailbox by connecting to Exchange Online PowerShell and using the -Shared switch:
New-Mailbox -Shared -Name "Support" -DisplayName "Support" -Alias support
A shared mailbox needs no license if it remains within the applicable size limit. Grant team members access with Add-MailboxPermission (Full Access) and Add-RecipientPermission (Send As).
If the user exists in Microsoft 365 without a mailbox, assign them an Exchange Online license and the mailbox is created automatically. If the user is an on-premises account synced through Entra Connect in a hybrid setup, run Enable-RemoteMailbox on-premises to create their cloud mailbox, then let the directory sync and license assignment finish.
A user mailbox requires a license that includes Exchange Online, and the mailbox is provisioned when that license is assigned. A shared mailbox does not require a license as long as it stays under the 50GB limit, so you can create it directly with New-Mailbox -Shared without assigning a license.