Enable M365 Mailbox Archiving Using PowerShell

Following our previous post on archiving, today we will show how to enable archiving on a mailbox hosted on Microsoft 365 using PowerShell.

If you would like to use the Microsoft 365 portal to enable archiving, visit this post.

Enable Archiving

Before enabling archiving, you can first check all the users that have archiving enabled on their mailboxes using the following command.

Get-Mailbox -resultsize unlimited -Archive

To check if archiving is enabled on a specific mailbox, run the following command with a user UPN.

Get-Mailbox -Identity [email protected] | select archive*

To enable archiving on a single mailbox, run the following command.

enable-Mailbox -Identity [email protected] -Archive

After running the command, the output would look like the screenshot below.

To enable archiving on all the mailboxes in the organisation, use this command.

Get-Mailbox -resultsize unlimited -Filter {ArchiveGuid -eq "00000000-0000-0000-0000-000000000000" -and RecipientTypeDetails -Eq "usermailbox"} | enable-mailbox -Archive


Posted

in

by

Comments

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.