Skip to main content

Mailbox Processing

This page provides a quick reference for managing mailbox automation, rules, and auto-reply settings in Exchange Online using PowerShell.


๐Ÿ“˜ Connecting to Exchange Online

Connect-ExchangeOnline -UserPrincipalName [email protected]

โš™๏ธ Mailbox Processing Overview

Mailbox processing tasks automate message handling and mailbox rules to reduce manual admin effort.
Key areas include:

  • Inbox Rules
  • Automatic Replies (OOF)
  • Retention Policies
  • Forwarding Rules

๐Ÿงฉ View Mailbox Settings

Get-Mailbox -Identity "UserName" | Format-List Identity,DeliverToMailboxAndForward,ForwardingSMTPAddress,RetentionPolicy

View mailbox features:

Get-CASMailbox -Identity "UserName" | Format-List ActiveSyncEnabled,OWAEnabled,PopEnabled,ImapEnabled

๐Ÿ“ฌ Mail Forwarding

Enable Mail Forwarding

Set-Mailbox -Identity "UserName" -DeliverToMailboxAndForward $true -ForwardingSMTPAddress "[email protected]"

Disable Mail Forwarding

Set-Mailbox -Identity "UserName" -DeliverToMailboxAndForward $false -ForwardingSMTPAddress $null

๐Ÿงฐ Automatic Replies (Out of Office)

View Current AutoReply Configuration

Get-MailboxAutoReplyConfiguration -Identity "UserName"

Enable AutoReply (Internal & External)

Set-MailboxAutoReplyConfiguration -Identity "UserName" `
-AutoReplyState Scheduled `
-InternalMessage "I am currently out of the office. Please contact the helpdesk if urgent." `
-ExternalMessage "I am out of the office and will respond when I return." `
-StartTime "31/10/2025 09:00AM" -EndTime "07/11/2025 09:00AM"

Disable AutoReply

Set-MailboxAutoReplyConfiguration -Identity "UserName" -AutoReplyState Disabled

๐Ÿงพ Inbox Rules

View Existing Inbox Rules

Get-InboxRule -Mailbox "UserName"

Create a New Inbox Rule

New-InboxRule -Mailbox "UserName" -Name "Move from HR" -From "[email protected]" -MoveToFolder "Inbox\HR"

Delete an Inbox Rule

Remove-InboxRule -Mailbox "UserName" -Identity "Move from HR"

๐Ÿ—“ Retention & Archiving

View Retention Policy Assigned

Get-Mailbox -Identity "UserName" | Select Identity,RetentionPolicy

Assign a New Retention Policy

Set-Mailbox -Identity "UserName" -RetentionPolicy "Default MRM Policy"

Enable In-Place Archive

Enable-Mailbox -Identity "UserName" -Archive

Check archive status:

Get-Mailbox -Identity "UserName" | Select Name,ArchiveStatus

๐Ÿ“Š Quick Reference Summary

Task Command Notes
View mailbox settings Get-Mailbox -Identity "User" Show forwarding, retention, etc.
Enable forwarding Set-Mailbox -Identity "User" -ForwardingSMTPAddress "..." Forward mail externally
Manage auto-replies Set-MailboxAutoReplyConfiguration Enable or disable OOF replies
Manage inbox rules New-InboxRule / Remove-InboxRule Automate message handling
Assign retention policy Set-Mailbox -Identity "User" -RetentionPolicy "PolicyName" Manage message lifecycle
Enable archiving Enable-Mailbox -Identity "User" -Archive Adds online archive mailbox

๐Ÿงฉ Notes

  • Forwarding rules can be disabled at the org level using transport settings for security.
  • Auto-replies may take several minutes to update across devices.
  • Use retention policies to ensure compliance and prevent mailbox bloat.

Updated: {{ date }}
Author: Tomas Toohey
Reference Category: Exchange Quick References