How to Create and Manage a Shared Mailbox in Microsoft 365 Using PowerShell

Introduction

A shared mailbox allows multiple users to send and receive emails from a common address, making collaboration easier for teams. This guide walks you through creating a shared mailbox, assigning permissions, and verifying settings using PowerShell.

Using PowerShell provides faster and more efficient management, especially when handling multiple mailboxes.


๐Ÿ”น Step 1: Connect to Microsoft 365 PowerShell

Before creating the shared mailbox, connect to Exchange Online.

Run the following command:

powershellCopyEditConnect-ExchangeOnline -UserPrincipalName [email protected]

๐Ÿ“Œ Replace [email protected] with your admin account email.


๐Ÿ”น Step 2: Create the Shared Mailbox

Use this PowerShell command to create a shared mailbox:

powershellCopyEditNew-Mailbox -Shared -Name "TeamMailbox" -DisplayName "Team Shared Mailbox" -PrimarySmtpAddress "[email protected]"

๐Ÿ“Œ Replace "TeamMailbox" and "[email protected]" with your preferred mailbox name and email address.


๐Ÿ”น Step 3: Assign Permissions

Once the mailbox is created, grant access to specific users.

Grant Full Access (Allows users to manage the mailbox)

powershellCopyEditAdd-MailboxPermission -Identity "[email protected]" -User "[email protected]" -AccessRights FullAccess -InheritanceType All

Grant Send As Permission (Allows users to send emails from the shared mailbox)

powershellCopyEditAdd-RecipientPermission -Identity "[email protected]" -Trustee "[email protected]" -AccessRights SendAs -Confirm:$false

๐Ÿ“Œ Replace "[email protected]" with the email of the user who needs access.


๐Ÿ”น Step 4: Verify the Shared Mailbox and Permissions

Once configured, verify that the mailbox exists and has the correct settings.

Check Mailbox Details

powershellCopyEditGet-Mailbox -Identity "[email protected]" | Format-List DisplayName,PrimarySmtpAddress,RecipientTypeDetails

List Users with Full Access

powershellCopyEditGet-MailboxPermission -Identity "[email protected]" | Where-Object { $_.AccessRights -eq "FullAccess" -and $_.User -notlike "NT AUTHORITY\SELF" } | Select-Object User,AccessRights

List Users with Send As Permission

powershellCopyEditGet-RecipientPermission -Identity "[email protected]" | Where-Object { $_.AccessRights -eq "SendAs" } | Select-Object Trustee,AccessRights

๐Ÿ”น Step 5: Confirm the Shared Mailbox in Microsoft 365

You can also check the mailbox in Microsoft 365 Admin Center:

1๏ธโƒฃ Sign in to Microsoft Admin Center.
2๏ธโƒฃ Go to Exchange Admin Center โ†’ Recipients โ†’ Shared.
3๏ธโƒฃ Locate the mailbox and confirm the settings.


๐Ÿš€ Conclusion

By following these steps, you can create, manage, and verify a shared mailbox using PowerShell.

โœ” No license required
โœ” Centralized team email management
โœ” Easier collaboration

๐Ÿ’ฌ How do you manage shared mailboxes in your organization? Share your best practices in the comments below! โฌ‡๏ธ

ยฉ 2012โ€“2025 Jet Mariano. All rights reserved.
For usage terms, please see the Legal Disclaimer.

error: Content is protected !!