đź”§ New: User Management Graph PowerShell Toolkit

Simplify user tasks like bulk creation, updates, password resets, deletions, license checks & more — all from one place.

🚀 Launch Toolkit

New-Mailbox: Create Mailboxes in Exchange Online with PowerShell

While Microsoft Graph PowerShell is growing rapidly in capabilities, it still does not support mailbox creation as of now. For administrators managing resource mailboxes or shared departmental accounts, Exchange Online PowerShell remains essential (especially for automation purposes). One such key cmdlet is New-Mailbox, which is used to create shared, room, and equipment mailboxes in Exchange Online.


i) Prerequisites

Before using the New-Mailbox cmdlet, ensure:

Install the Exchange Online Management Module:

Install-Module -Name ExchangeOnlineManagement

Connect to Exchange Online:

Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com

đź’ˇ You must have the Exchange Administrator role assigned to your account.


ii) Cmdlet Syntax

New-Mailbox [-Shared | -Room | -Equipment]
-Name 
[-DisplayName ]
[-Alias ]

Note: New-Mailbox does not support user creation in pure cloud-only Microsoft 365 environment. In cloud-only Microsoft 365 environment, user mailboxes are created when users are assigned with license (Microsoft Exchange Online License). But in hybrid and on-premise Exchange environment, New-Mailbox cmdlet creates a user.


iii) Usage Examples

  1. Create a Shared Mailbox
  2. New-Mailbox -Shared -Name "HR Shared" -DisplayName "HR Shared Mailbox" -Alias HRShared

    Creates a shared mailbox named HR Shared Mailbox that multiple users can access.

  3. Create a Room Mailbox
  4. New-Mailbox -Room -Name "Conf Room A" -DisplayName "Conference Room A" -Alias ConfA

    Creates a room mailbox used to reserve a meeting space (e.g., conference room).

  5. Create an Equipment Mailbox
  6. New-Mailbox -Equipment -Name "Projector1" -DisplayName "Main Hall Projector" -Alias projector1

    Creates an equipment mailbox to track the availability of shared equipment (e.g., projectors).

  7. Create a Shared Mailbox Without Display Name
  8. New-Mailbox -Shared -Name "LegalShared" -Alias LegalDept

    Creates a shared mailbox using just the name and alias; Exchange auto-generates the display name.


iv) Possible Errors & Solutions

Error Message Cause Solution
The term 'New-Mailbox' is not recognized Exchange module not loaded or session not connected Run:
Install-Module ExchangeOnlineManagement
Connect-ExchangeOnline
A parameter cannot be found that matches parameter name 'UserPrincipalName' Attempting to use parameters unsupported in Exchange Online Do not use -UserPrincipalName, -Password, or -MicrosoftOnlineServicesIDs
You don’t have permission to perform this action Insufficient RBAC permissions Assign the Recipient Management role via Exchange admin center
Alias already in use Another mailbox or object is using the alias Use a unique value for the -Alias parameter

Conclusion

The New-Mailbox cmdlet is an essential part of any Exchange Online admin’s toolkit — allowing the creation of shared mailboxes, rooms, and equipment resources without requiring a licensed user account. While Graph PowerShell does not yet support mailbox creation, Exchange PowerShell continues to be the preferred tool for these administrative tasks.

Use this cmdlet to efficiently manage organizational assets like shared email addresses and bookable resources across departments.


Graph PowerShell Explorer Widget

20 Graph PowerShell cmdlets with easily accessible "working" examples.


Permission Required

Example:


                


                


                

© m365corner.com. All Rights Reserved. Design by HTML Codex