Exchange Online: Enable Auto-Expanding Archive

1. Connect to Exchange Online

Uses the Exchange Online PowerShell V3 module (REST based, not the old remote PowerShell session).

Install-Module ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com
Get-ConnectionInformation

2. Enable it

The user must already have an archive (Enable-Mailbox user@yourdomain.com -Archive).

One user:

Enable-Mailbox user@yourdomain.com -AutoExpandingArchive

Whole organization:

Set-OrganizationConfig -AutoExpandingArchive

Careful: auto-expanding archiving can't be turned off once enabled, for a user or for the organization. Check your retention and licensing before enabling it globally.

3. Check

Get-Mailbox user@yourdomain.com | Format-List AutoExpandingArchiveEnabled
Get-MailboxStatistics user@yourdomain.com -Archive | Format-List TotalItemSize

In the Exchange admin center: Mailboxes > user > Others > Manage mailbox archive.

Extra space is added automatically as the archive fills up, but it can take a while (Microsoft says up to 30 days) to provision.

Written by Daniel Ruiz Peláez, Systems & Infrastructure Engineer (Linux, VMware, Proxmox, Active Directory, networking and security). These are notes from real problems I have solved.

← Back to all posts