Archive mailboxes in Exchange Online (In-Place Archiving)

Archive Mailbox provides an additional storage to users, to eliminate the need of PST file to reduce the mailbox size, archive mailbox is accessible in OWA (outlook web access) as well as the outlook for users.

Once the Archive Mailbox is enabled, Default Retention Policy does the following within 7 days after the archive mailbox is enabled.
  • Items older than 2 years are moved from user primary mailbox to archive mailbox.
  • Items older than 14 days are moved from the Recoverable Items folder from the user's primary mailbox to the Recoverable Items folder in their archive mailbox.

Enabling Archive

Below cmd enable Archive for a single user Mailbox

Enable-Mailbox "Sunil Chauhan" -Archive

Enables an archive for all user mailboxes in your organization.

Get-Mailbox -Filter {ArchiveStatus -Eq "None" -AND RecipientTypeDetails -eq "UserMailbox"} | Enable-Mailbox -Archive

Disabling Archive

Below CMD will disable Archive for a user

Disable-Mailbox -Identity "Sunil Chauhan" -Archive

Create a cloud-based archive for an on-premises primary mailbox in an Exchange hybrid deployment

In a Hybrid Exchange server environment, we can enable an on-premise mailbox for an online archive.

before we can enable archiving we need to know the Target Remote Archiving domain, this is setup when we setup the hybrid with the office365.

Run the below cmd to get the same.

Get-RemoteDomain | Where {$_.TargetDeliveryDomain -eq $true}

Next to enable remote archive run the below cmd.

Enable-Mailbox -RemoteArchive -ArchiveDomain ""

Reference Link: