How to Create Shared Mailboxes in Exchange Online with PowerShell (Without Losing Your Mind)

Shared mailboxes are like the team water cooler of email—everyone gathers around them, they facilitate collaboration, and occasionally someone forgets to clean up after themselves. Unlike that ancient coffee machine in the break room, though, shared mailboxes actually serve a useful purpose: letting multiple users read and send email from a common address without burning through your Office 365 licenses.

If you’ve been clicking through the Exchange admin center like it’s 2010, it’s time to embrace the power of PowerShell. Trust us, your future self (and your carpal tunnel) will thank you.

Before We Dive In: The Prerequisites

Or “Things you need to not have a terrible time”

Before you start typing commands like a caffeinated sys admin, make sure you have:

Appropriate Permissions – You’ll need admin rights in your Office 365 tenant. If you’re not sure whether you have these permissions, try creating a test mailbox. If it works, great! If it doesn’t, go have a conversation with whoever controls the keys to your digital kingdom.

PowerShell Modules Installed – You’ll need the Exchange Online PowerShell module. If you don’t have it yet, run this command (and yes, you need to run PowerShell as admin, because Microsoft):

Install-Module -Name ExchangeOnlineManagement

Step 1: Connect to Exchange Online

The “please hold while we verify you’re actually allowed to do this” dance

First, you need to establish a connection to Exchange Online. It’s like showing your ID at a club, except the bouncer is Microsoft and the club is your email infrastructure.

Open PowerShell as an administrator (right-click, “Run as administrator”—you know the drill)

Import the module and connect:

Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName youradmin@yourdomain.com -ShowProgress $true

Replace youradmin@yourdomain.com with your actual admin email address. The -ShowProgress $true flag is optional, but it’s nice to see that something is actually happening while you wait.

Step 2: Create Your Shared Mailbox

Where the magic happens (finally)

Now for the main event. We’re going to use the New-Mailbox cmdlet, which is PowerShell’s way of saying “let’s make a mailbox without clicking through seventeen different screens.”

Define your mailbox parameters:

$DisplayName = "Support Team"
$Alias = "support"

Create the shared mailbox:

New-Mailbox -Name $DisplayName -Alias $Alias -Shared

That’s it! You’ve just created a shared mailbox named “Support Team” with the alias “support.” The email address will be support@yourdomain.com, and it’s ready to start collecting emails about password resets and “my computer is slow.”

Step 3: Assign Permissions

Deciding who gets to play with the new toy

Creating a mailbox without permissions is like building a house without doors—technically functional, but not very useful. Here are the three main types of access you can grant:

Full Access Permission – Lets users open the mailbox and send emails as if they own it:

Add-MailboxPermission -Identity "support" -User user1@yourdomain.com -AccessRights FullAccess -InheritanceType All

Send As Permission – Allows users to send emails as the shared mailbox (the email will appear to come directly from the shared mailbox):

Add-RecipientPermission -Identity "support" -Trustee user1@yourdomain.com -AccessRights SendAs

Send On Behalf Permission – Like Send As, but the email shows who actually sent it (more transparent, less confusing for recipients):

Set-Mailbox -Identity "support" -GrantSendOnBehalfTo user1@yourdomain.com

Replace user1@yourdomain.com with the actual email addresses of the people who need access. You can run these commands multiple times for different users, or list multiple users in a single command if you’re feeling efficient.

Step 4: Fine-Tune Your Settings

Because one size never fits all

You might want to tweak a few additional settings to make your shared mailbox behave exactly how you want:

Disable Auto-Mapping – By default, Outlook automatically shows the shared mailbox in users’ folder lists. If you want to disable this (maybe for a mailbox that’s only used occasionally):

Set-MailboxPermission -Identity "support" -User user1@yourdomain.com -AccessRights FullAccess -AutoMapping:$false

Set Storage Quotas – Because even shared mailboxes need boundaries:

Set-Mailbox -Identity "support" -ProhibitSendReceiveQuota 10GB -ProhibitSendQuota 9.5GB -IssueWarningQuota 9GB

This sets up a 10GB limit with warnings starting at 9GB—adjust these numbers based on your organization’s needs and storage philosophy.

Step 5: Clean Up Your Session

The responsible admin’s goodbye

When you’re done creating and configuring mailboxes, disconnect your PowerShell session. It’s good housekeeping and helps avoid those “why am I still connected to Exchange?” moments later:

Disconnect-ExchangeOnline -Confirm:$false

The -Confirm:$false flag skips the “are you sure?” prompt because you’re a confident admin who knows what they’re doing.

Pro Tips for Shared Mailbox Success

Naming conventions matter – Use clear, descriptive names that won’t confuse people six months from now. “info,” “support,” and “sales” are classics for a reason.

Document your permissions – Keep track of who has access to what. Future you (or your replacement) will appreciate the documentation.

Monitor usage – Shared mailboxes can become digital dumping grounds if left unchecked. Regular cleanup keeps things manageable.

The Bottom Line

Using PowerShell to create shared mailboxes is faster, more consistent, and infinitely more scalable than clicking through the web interface. Plus, you get to feel like a command-line wizard, which is always a bonus.

Whether you’re setting up a single support mailbox or provisioning dozens of shared mailboxes for a growing organization, PowerShell gives you the control and efficiency you need to get the job done without the repetitive clicking.

Ready to automate even more of your identity and email management? Discover how Adcyma can streamline your entire user provisioning process—because life’s too short for manual mailbox management.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top