Enable Online Archiving via PowerShell for All Users

Enable Online Archiving via PowerShell for All Users

Follow the steps below to enable the Online archive for all users through PowerShell

Use cases: This is to enable the online email archive for all users and other functioning email accounts using a single command line using PowerShell.
Applies to: Exchange Online, Exchange Server 2013

Items stored in the archive mailbox don’t count toward the user’s mailbox storage quota. An archive mailbox has its own archive quota and archive warning quota. In Exchange 2013, the default archive quota is 50 GB and the archive warning quota is 45 GB. In Exchange Online, archive quotas depend on the subscription plan.
  1. Open Exchange Online PowerShell:
    1. First, connect to Exchange Online PowerShell using the following commands:

      #$UserCredential = Get-Credential

      #Connect-ExchangeOnline -UserPrincipalName <admin_user_email> -ShowProgress $true

  2. Enable Archiving for All Users:
    1. Use the following command to enable archiving for all mailboxes:

      #Get-Mailbox -Filter {ArchiveStatus -Eq "None"} | Enable-Mailbox -Archive

    2. This will enable the archive mailbox for all users who do not currently have it enabled.  

  3. Check Archiving Status:
    1.  To verify which users have archiving enabled, run the following command:
      #Get-Mailbox | Select-Object DisplayName,ArchiveStatus  
    2. This will display a list of users and their archiving status (Active means archiving is enabled).

  4. Close PowerShell Session:
    1. Once you're done, close the PowerShell session using:
      #Disconnect-ExchangeOnline

Manually enable Online Archive via Microsoft Exchange admin center

  1. Open the Exchange Admin Center (EAC)
    1. In the left-hand menu, scroll down to Admin centers.
    2. Click on Exchange to open the Exchange Admin Center.

  2. Go to Recipients
    1. In the EAC, in the left navigation pane, click on Recipients.
    2. Under Recipients, click Mailboxes
    3. List of all the mailboxes in your organization.

  3. Select the Mailboxes
    1. Single User: To enable archiving for a single user, click on the user’s mailbox to select it.

  4. Enable Archive Mailbox
    1. After selecting the mailbox or mailboxes, navigate to Others option in the right-hand pane, scroll down to the In-Place Archive section.
    2. Click on Enable next to In-Place Archive

  5. Verify Archive Activation
    1. Once enabled, the process may take a few minutes to provision the archive mailbox.
    2. To verify:
      1. Go back to the Mailboxes list.
      2. Click on a user's mailbox and look for the In-Place Archive section; it should now be marked as Enabled.

EAC Result 

After successfully enabling the Email Archive