Export Office 365 Archive Mailbox Size Report Using PowerShell

The archive mailboxes are the additional mailbox storage space to the primary mailboxes. The archive mailboxes are used to retain the business information for a more extended period for all company employees. The archive mailboxes play both the active backup directory and stored message viewer roles. Generally, the user and shared mailboxes widely use the archive mailbox facility. 

Based on the usage of the archive mailboxes, the size and necessity vary for each mailbox. So, it is essential to track mailbox size and archive mailbox usage to retain the business data.

 

Why the Archive Mailbox Size Report is Important for the Admin? 

  1. When the user requests additional archive mailbox space, it is essential to track the usage ladder. 
  2. To suggest to the business people when and how to invest in the Exchange Online mailbox. 
  3. The archive mailbox size report will help the admin understand which mailbox is effectively using and have a massive need for the archive mailbox feature.  
  4. The most common error: “Archive mailbox is full” need immediate action from the admin. So, knowing the archive mailbox size data before the error appears becomes an important task for the admin. 
  5. To help the users to meet your organization’s retention, eDiscovery, and hold requirements. All these policies come under the archive mailbox data. 

 

How to View the Exchange Online Archive Mailbox? 

  1. UI Navigation: Go to the Exchange Online admin center –> Select a mailbox –> Click on ‘Manage mailbox archive. You can see the size of the archive mailbox size. 
  2. PowerShellGet-MailboxStatistics cmdlet is used to view the archive mailbox size 

Following the above two ways, you can view archive mailbox size of the mailboxes. But both has the major drawback. The UI doesn’t have the consolidated report for the archive mailboxes size. In PowerShell coding, you may end up in the tedious process 

On the other hand, by using our PowerShell script, you get all the archive mailboxes size report. This PowerShell script covers all the use cases with time-saving and minimal effort. You can download the script to breakout all your ever-lasting questions under the archive mailbox size zone. 

Download Script: GetArchiveMailboxSize.ps1

 

Script Highlights: 

  • Validates aninstalls Exchange Online PowerShell module upon user confirmation (if not exists already) 
  • Facility to supply the input and export the output in the CSV format 
  • The report is delivered with the significant attributes. As it is the userfriendly script, you can publish desired attributes too. 
  • Supports both MFA and Non-MFA accounts
  • The script is scheduler-friendly. You can schedule the report generation upon giving UserName and Password 

 

Archive Mailbox Size Report – Sample Output:

The exported report looks similar to the screenshot below:

Office 365 Archive mailbox size report

The report has the following attributes: Display Name, Email Address, Recipient Type, Archive Name, Archive Mailbox Size, Archive Mailbox Size(Bytes), Archive Quota, Archive Warning Quota, Archive Status, Archive State, and Auto Expanding Archive.

 

Exchange Online Archive Mailbox Size – Script Execution

The script has many use cases under the archive mailboxes. Based on your need, you can generate a more granular archive mailbox usage report. 

Export All the Archive Mailbox in the Tenant

By default, the script will identify all the archive mailbox in the tenant and export them to CSV file. 

This format will help in encountering both MFA enabled and Non-MFA admin accounts.  

 

Get Archive Size for User Mailboxes 

User enables the archive mailbox as the add-on mailbox to their primary mailbox. This additional mailbox has the backup of all the e-mails. By knowing the archive mailbox size, user can move or copy messages between their primary mailbox and their archive mailbox. Thus, this report helps in maintaining both primary and archive mailboxes. 

To export archive enabled user mailboxes, you can run the script with UserMBOnly param.

 

Export Shared Archive Mailbox and Their Size 

The shared archive mailboxes are used with and without license, based on the organizations’ needWithout license, you can do online archiving up to 50GB and with license you can enable retention policies and unlimited archiving. By knowing the archive mailboxes size, the license cost can be managed, reclaim unused licenses and even eliminated. 

 To find shared mailbox archive size, you can execute the script with –SharedMBOnly param. 

 

Identify Mailboxes with Auto-expanding Archives 

The AutoExpandingarchiveEnabled“ property allows the user to have risk-free Unlimited archivingThe maximum growth rate of this feature cannot exceed 1GB per day.  

To list mailboxes with unlimited archiving, you can run the script withAutoExpandingArchiveEnabled switch param. 

The exported report contains autoexpanding Enabled archive mailboxes. 

 

Get Archive Size for Specific Mailboxes (Input Through Csv)

For large tenant, processing all mailbox may time-consuming. But, most of the time, the admin wants to find usage of specific mailboxes alone. Thscript allows you to provide input in the CSV format. The Input value can be any unique Identity of the mailboxes. With that identity value alone, you can bring out the archive mailboxes size of that users. 

Input File Format: 

Simply list the Display Name/User Principal Name/Guid/Alias/Email Address. 

archive mailbox size

 

Get Scheduled Exchange Online Archive Mailbox Size Report 

To schedule this script, you can use task scheduler by explicitly mentioning the credential. Take a look at the below format to get the scheduled archive mailbox size report. 

To know more about scheduling PowerShell script, refer our blog: Schedule PowerShell script using Task Scheduler. 

 

More Use Cases 

When you want to generate more granular archive mailbox reports, you can use multiple params together. For example, 

To get user mailboxes with unlimited archiving:

 

To list shared mailboxes with unlimited archiving:

 

Find mailboxes’ archive usage for user mailboxes given in the CSV file:

 

Find mailboxes’ archive usage for shared mailboxes given in the CSV file:

 

By using the script, you can retrieve various archive mailbox related data. In addition, you gain mailbox maintenance, reduce license usagemonitor unlimited storage mailboxes, and above all helps to balancing the primary and archive mailbox storage.  

We hope you are amused by the script performance. Happy Learning!