Exchange Online PowerShell in 2026: The Commands You Actually Need

From Exchange Server to Microsoft 365

Moving from Exchange Server to Exchange Online changes more than where your mailboxes are hosted.

The biggest change is the administration model.

Exchange Server → Servers → Databases → DAGs → Queues → Mailboxes

Exchange Online → Users → Mailboxes → Permissions → Groups → Mail Flow → Policies

If you’re an Exchange administrator moving into Microsoft 365, you will quickly notice that some familiar PowerShell commands still work, some have newer Exchange Online-optimized alternatives, and others should simply be removed from your toolbox.

💡 The goal isn’t to memorize hundreds of commands. It’s to know the right command for the problem you’re trying to solve.

🔌 1. Connect to Exchange Online

Before running Exchange Online PowerShell commands, establish a connection to your Microsoft 365 tenant.

Connect-ExchangeOnline

When you’re finished:

Disconnect-ExchangeOnline

To check your current connection:

Get-ConnectionInformation

👥 2. Find Who Manages a Distribution Group

Need to find out who owns a distribution list?

Get-DistributionGroup -Identity "DL Name" |
Format-List DisplayName,ManagedBy

For a cleaner table:

Get-DistributionGroup -Identity "DL Name" |
Format-Table DisplayName,ManagedBy -Wrap

You can also search for groups managed by a specific person:

Get-DistributionGroup -ManagedBy "user@contoso.com"
Useful for:Access reviews, audits, organizational changes, mail-flow troubleshooting and distribution-group cleanup.

📋 3. See Distribution Group Members

Finding the owner is only half the job. You may also need to see who belongs to the group.

Get-DistributionGroupMember -Identity "DL Name"

For a more useful report:

Get-DistributionGroupMember -Identity "DL Name" |
Format-Table Name,PrimarySmtpAddress,RecipientType

📬 4. Give a User Full Access to a Mailbox

This remains one of the most common Exchange Online administration tasks.

Add-MailboxPermission `
-Identity "shared@contoso.com" `
-User "user@contoso.com" `
-AccessRights FullAccess `
-InheritanceType All

If you don’t want Outlook to automatically map the mailbox:

Add-MailboxPermission `
-Identity "shared@contoso.com" `
-User "user@contoso.com" `
-AccessRights FullAccess `
-InheritanceType All `
-AutoMapping $false
💡 Tip:AutoMapping can become annoying when a user has access to many shared mailboxes. Setting it to $false prevents automatic Outlook mapping.

✉️ 5. Give Send As Permission

This is an important difference for administrators coming from on-premises Exchange.

❌ Old Exchange Server approach

Add-ADPermission

✅ Exchange Online approach

Add-RecipientPermission `
-Identity "shared@contoso.com" `
-Trustee "user@contoso.com" `
-AccessRights SendAs

Verify the permission:

Get-RecipientPermission `
-Identity "shared@contoso.com" `
-Trustee "user@contoso.com"

Full Access

The user can open and work with the mailbox.

Send As

The user can send messages that appear to come directly from that mailbox.

🔎 6. Check Mailbox Size

Exchange Online administrators should become familiar with the Exchange Online optimized cmdlets.

Get-EXOMailboxStatistics `
-Identity "user@contoso.com"

For more information:

Get-EXOMailboxStatistics `
-Identity "user@contoso.com" |
Format-List DisplayName,ItemCount,TotalItemSize,TotalDeletedItemSize
You can quickly see:

  • Mailbox size
  • Item count
  • Deleted-item size

📊 7. Find Large Mailboxes

Need to identify users with unusually large mailboxes?

Get-EXOMailbox -ResultSize Unlimited |
ForEach-Object {
    Get-EXOMailboxStatistics -Identity $_.UserPrincipalName
} |
Sort-Object TotalItemSize -Descending |
Select-Object DisplayName,TotalItemSize,ItemCount
⚠️ Administrator tipTenant-wide queries can be expensive. For large environments, use targeted filters whenever possible.

🔁 8. Check and Configure Mailbox Forwarding

Mailbox forwarding is another common support request.

Check the current configuration:

Get-Mailbox "user@contoso.com" |
Format-List ForwardingAddress,ForwardingSmtpAddress,DeliverToMailboxAndForward

To configure forwarding:

Set-Mailbox `
-Identity "user@contoso.com" `
-ForwardingAddress "manager@contoso.com" `
-DeliverToMailboxAndForward $true
⚠️ ImportantExternal automatic forwarding can be restricted by your organization’s Exchange Online outbound-spam and automatic-forwarding policies. If forwarding doesn’t work, check the policy configuration as well.

📁 9. Manage Exchange Online Public Folders

Public folders are still used by many organizations.

To give a user Publishing Editor permission:

Add-PublicFolderClientPermission `
-Identity "\IT" `
-User "user@contoso.com" `
-AccessRights PublishingEditor

Check the permission:

Get-PublicFolderClientPermission `
-Identity "\IT" `
-User "user@contoso.com"

📅 10. Configure Calendar Processing

Resource and shared mailboxes often require customized calendar-processing settings.

Set-CalendarProcessing `
-Identity "meetingroom@contoso.com" `
-DeleteSubject $false `
-AddOrganizerToSubject $false

Check the current configuration:

Get-CalendarProcessing `
-Identity "meetingroom@contoso.com"
Useful for:Room-booking troubleshooting, meeting-room configuration and shared-resource mailboxes.

🗑️ 11. Investigate Recoverable Items

Don’t simply copy old Exchange Server dumpster-export procedures into Exchange Online.

For investigation, use mailbox folder statistics:

Get-EXOMailboxFolderStatistics `
-Identity "user@contoso.com" `
-FolderScope RecoverableItems

This can help investigate Recoverable Items usage, deleted-item volume and retention-related storage.

🔍 12. Troubleshoot Mail Flow With Message Trace

This is one of the biggest mindset changes when moving from Exchange Server to Exchange Online.

❌ Don’t troubleshoot Microsoft’s backend transport servers with:

Get-Queue

Instead, start with message tracing.

Get-MessageTrace `
-SenderAddress "user@contoso.com" `
-StartDate "08/14/2026" `
-EndDate "08/15/2026"

💡 The mindset change:

You troubleshoot the message journey, rather than Microsoft’s underlying transport servers.

❌ 13. Exchange Server Commands You Should Remove

A lot of old Exchange PowerShell articles mix on-premises commands with Exchange Online commands. That can be confusing for administrators.

❌ DAG Database Health

Get-MailboxDatabaseCopyStatus

DAG and database-copy management is an Exchange Server administration task. Exchange Online customers don’t manage Microsoft’s underlying mailbox database copies.

❌ Transport Queue Management

Get-Queue

Exchange Online administrators don’t manage Microsoft’s backend transport queues.

❌ Mailbox Export Requests

New-MailboxExportRequest
Get-MailboxExportRequest

These are Exchange Server concepts and should not be presented as Exchange Online commands.

🧠 The Biggest Mindset Change

Exchange Server

SERVER


DATABASE


DAG


QUEUE


MAILBOX

Exchange Online

MICROSOFT 365


EXCHANGE ONLINE


MAILBOX / GROUP


POLICY / PERMISSION


USER

Microsoft operates the underlying Exchange Online infrastructure. Your responsibility is primarily configuration, identity, permissions, policies, security and workloads.

🚀 Your Essential Exchange Online Toolkit

If you’re building a practical PowerShell toolkit for Microsoft 365 administration, start with these commands:

# Connection
Connect-ExchangeOnline
Disconnect-ExchangeOnline

# Groups
Get-DistributionGroup
Get-DistributionGroupMember

# Mailboxes
Get-EXOMailbox
Get-EXOMailboxStatistics
Get-EXOMailboxFolderStatistics

# Permissions
Add-MailboxPermission
Get-MailboxPermission
Add-RecipientPermission
Get-RecipientPermission

# Public Folders
Add-PublicFolderClientPermission
Get-PublicFolderClientPermission

# Calendar
Set-CalendarProcessing
Get-CalendarProcessing

# Mail Flow
Get-MessageTrace

🎯 Final Thought

Exchange Online is not simply Exchange Server hosted in Microsoft’s cloud.

The administration philosophy has changed.

You’re no longer spending your day asking:

“Which database is unhealthy?”

You’re more likely asking:

“Who has access to this mailbox?”
“Why isn’t this message arriving?”
“Who owns this distribution group?”
“Why is this mailbox so large?”
“Why isn’t forwarding working?”

Less infrastructure. More service management.

Exchange Online PowerShell commands, Exchange Online PowerShell, Microsoft 365 PowerShell, Office 365 PowerShell, Exchange Online commands, Exchange Online administration, Microsoft 365 administrator, mailbox permissions, Exchange Online troubleshooting.

Similar Posts

Leave a Reply

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