How to Enable the Auto-Expanding - Online Email Archive using PowerShell

How to Enable the Auto-Expanding - Online Email Archive using PowerShell

Install and Connect to the Exchange Online PowerShell Module

Root Cause:  Auto-expanding online Email archive for exchange online plan2 users.

  1. Install the Exchange Online Management Module:

    1. Open PowerShell as an administrator.
    2. Install the Exchange Online Management module by running the following command:
      1. #Install-Module -Name ExchangeOnlineManagement
    3. If prompted to install the NuGet provider, confirm by typing Y and pressing Enter.
    4. If prompted to install the module from the PSGallery, confirm by typing Y and pressing Enter.
  2. Import the Exchange Online Management Modul:

    1. Import the module into your session:
      1. #Import-Module ExchangeOnlineManagement
  3. Connect to Exchange Online:

    1. Connect to Exchange Online with the following command:
    2. Use the Connect-ExchangeOnline command to connect to Exchange Online. Replace admin@yourdomain.com with the actual admin email address:
      1. #Connect-ExchangeOnline -UserPrincipalName user@domain.com -ShowProgress $true
    3.  A sign-in window will appear. Enter the Office 365 admin credentials.
  4. Enable Auto-Expanding Archiving:

    1. Once connected, run the command to enable auto-expanding archiving:
    2. Replace user@domain.com with Auto expand username@domain.com
      1. #Enable-Mailbox -Identity "user@domain.com" -AutoExpandingArchive

Verify the Archive Auto Expanding status

After running the Enable-Mailbox -Identity "user@domain.com" -AutoExpandingArchive command, you can verify whether auto-expanding archiving has been enabled by using the following steps:

  1. Check Archive Status via PowerShell

    1. You can check the status of the auto-expanding archive by running a PowerShell command to get the mailbox details and specifically look for the AutoExpandingArchiveEnabled property.
      1. #Get-Mailbox -Identity "user@domain.com" | Format-List AutoExpandingArchiveEnabled
  2. Check Archive Status via Exchange Admin Center (EAC)

You can also verify the status through the Exchange Admin Center (EAC):

  1. Login to EAC:

    1. Go to the Exchange Admin Center (https://admin.exchange.microsoft.com/).
    2. Login with your admin credentials.
    1. In the left pane, click on "Recipients."
    2. Click on "Mailboxes."
  2. Select the User Mailbox:

    1. Find and select the mailbox for which you enabled auto-expanding archiving.
  3. Check Archive Settings:

    1. In the mailbox properties pane, check the "In-Place Archive" section to see if the auto-expanding archive is enabled.
  4. Use PowerShell to Get Detailed Archive Information

    1. For a more detailed view of the archive properties, you can use the Get-Mailbox cmdlet combined with Format-List to display all relevant archive properties.
      1. #Get-Mailbox -Identity "user@domain.com" | Format-List *archive*
    2. This will show detailed information about the mailbox's archive settings, including ArchiveStatus, ArchiveDatabase, ArchiveGuid, ArchiveName, ArchiveQuota, ArchiveWarningQuota, and AutoExpandingArchiveEnabled.
  5. Verify Archive Size and Growth

    1. To monitor the size and growth of the archive mailbox, you can use the Get-MailboxStatistics cmdlet. This can help you track the usage over time to see if the archive is expanding.
      1. #Get-MailboxStatistics -Identity "user@domain.com" -Archive | Select DisplayName, TotalItemSize, ItemCount
    2. This command will display the archive mailbox statistics, including the total size and the number of items in the archive.

Archive Status via Exchange Admin Center (EAC)


    • Recent Articles

    • KB-630208 | How to use Find and Locate to search for files in Linux

      Purpose To provide Linux administrators and Field Engineers with guidance on using the find and locate utilities to efficiently search for files and directories within a Linux filesystem based on criteria such as name, type, size, timestamps, ...
    • KB-630164 | How to use rsync to Synchronize Files

      Purpose To provide a clear and practical procedure for using the rsync utility to synchronize files and directories between local systems and remote hosts, including push and pull operations, while preserving file attributes and optimizing data ...
    • KB-630107 | How to create a Linux swap file

      Purpose To provide Field Engineers and Linux administrators with a standardized procedure for creating, configuring, and validating a Linux swap file. This procedure helps ensure sufficient virtual memory is available when physical RAM is exhausted ...
    • MSI All-in-One (AIO) PC – Physical Damage Policy for Warranty Claims

      MSI All-in-One (AIO) PC – Physical Damage Policy for Warranty Claims MSI's standard warranty does not cover physical or accidental damage to an All-in-One (AIO) PC. If the damage is determined to be caused by external factors rather than a ...
    • KB 134833 - Troubleshooting NVSM Alert NV-CPU-XX – Unrecoverable CPU Internal Error

      Purpose This document provides a general troubleshooting procedure for the NVIDIA System Management (NVSM) alert NV-CPU-XX, which indicates that a CPU has reported an internal error. The article outlines how to verify whether the alert represents an ...
    • Popular Articles

    • CP Plus Camera and NVR Configuration

      NVR Configuration The CP Plus Pro Series of NVRs have been meticulously designed for providing you with upgraded performance and higher recording quality in your IP video surveillance solution. The robust processor that has been inculcated in this ...
    • KB 775235 - Kerberos Authentication – Overview

      What is Kerberos? Kerberos is a secure authentication method used in our Active Directory (AD) environment (mbuzztech.com). It allows users to: Access multiple systems without re-entering passwords (Single Sign-On – SSO) Log in once Where We Use It ...
    • How to Remove and Reinstall NVIDIA Drivers on Ubuntu

      This article provides step by step guide to completely remove existing NVIDIA drivers and reinstall specific version of the NVIDIA driver on the Ubuntu system Prerequisites Administrative (sudo) access to the Ubuntu system. Internet access to ...
    • KB 692001 - Personal Computers and Servers - Classification and Point of Contact

      We can classify the computers that MBUZZ handles based on their form-factor as below: Tower Workstations, Desktops, Gaming PCs and SFF (Small form factor) PCs fall under this category. These are computers people would use on a desk and rarely move. ...
    • KB 298031 - M.2 SSD Tier List

      The sequential read and write speeds, which are usually the most advertised number, are not a proper benchmark of real-world performance or the quality of an SSD. This article categorizes and tiers SSDs based on factors like the type of NAND flash, ...