Home and Living Room

Gazette

get mailbox size in gb powershell exchange 2016

How to Get Mailbox Size in GB: PowerShell for Exchange 2016

By James Hernandez
AD

Managing mailbox storage effectively is a critical task for Exchange Server administrators, and knowing how to get mailbox size in GB PowerShell Exchange 2016 is often the first step in proactive capacity planning. Without regular audits, mailboxes can expand silently, consuming database space and increasing backup windows until they eventually hit regulatory or storage limits. The following guide provides a detailed look at the specific cmdlets, parameters, and best practices required to accurately report mailbox sizes in a human-readable format.

Understanding Mailbox Size Discrepancies

Before diving into the scripts, it is essential to understand why reported sizes might vary between the Management Console and PowerShell. The primary reason lies in how Exchange calculates "Total Item Size." This value typically includes the primary mailbox, archive mailbox, and any associated hidden folders or Recoverable Items data. When you run a command to get mailbox size in GB PowerShell Exchange 2016, you are often looking for the *Provisioned* size, which is the current physical footprint, rather than the *Allocated* or *Used* size, which might require additional parameters to isolate.

Core Cmdlet: Get-MailboxStatistics

The foundation of any size audit relies on the Get-MailboxStatistics cmdlet. This command retrieves usage data for mailboxes and public folders, making it the go-to tool for administrators. To specifically target the metric of mailbox size in GB PowerShell Exchange 2016, you will pipe the results of this cmdlet to a selection of properties that display the data clearly. The key properties to focus on are TotalItemSize and ItemCount, as they provide the raw data needed for analysis.

AD
Smart Mailbox
Smart Mailbox
How to Build a Self Contained Email Environment
How to Build a Self Contained Email Environment
Here's How to Add A Shared Mailbox into Outlook
Here's How to Add A Shared Mailbox into Outlook

Basic Size Retrieval

A standard approach to retrieve mailbox sizes involves selecting the display name and total item size. However, by default, TotalItemSize renders in a format like "XX MB YYYY KB." To meet the specific requirement to get mailbox size in GB PowerShell Exchange 2016, you must explicitly divide the value by 1GB. This conversion ensures that the output is standardized, making it significantly easier to compare large datasets across the organization without manual calculation.

Practical Scripts and Examples

Below are several practical examples that demonstrate how to get mailbox size in GB PowerShell Exchange 2016, ranging from a simple list to filtered reports for specific users or databases. These scripts assume you have the necessary permissions to run management commands on the Exchange server or remote PowerShell session.

an image of a bathroom with measurements
an image of a bathroom with measurements
a mailbox that has some papers in it
a mailbox that has some papers in it
5 Things to Do When Your Outlook Mailbox Is Full
5 Things to Do When Your Outlook Mailbox Is Full

Example 1: Database-Level Audit

The most common scenario is checking all mailboxes within a specific database. This is useful for capacity planning before migrating users or adding new users to a store. The script below retrieves the database name, user identity, and the precise size in gigabytes, sorted from largest to smallest for easy identification of heavy users.

Example 2: Individual User Check

If you need to investigate a single user, perhaps one who reported issues with sending mail, you can filter by alias or email address. This allows for a deep dive into a specific mailbox to determine if the growth is due to archived emails or an unexpected spike in contact storage.

AD

Formatting and Exporting Data

Raw numbers are only useful if they can be interpreted quickly. When you run the command to get mailbox size in GB PowerShell Exchange 2016, you should format the output as a table or list for immediate readability. Furthermore, exporting the results to a CSV file is a standard practice for documentation and sharing with non-technical stakeholders. This creates a permanent record that can be compared against future audits to track storage growth trends over time.

Add a New User to a Windows Domain Using Exchange 2007, 2010 - geekyprojects.com
Add a New User to a Windows Domain Using Exchange 2007, 2010 - geekyprojects.com
9 Top Virtual Mailbox Providers
9 Top Virtual Mailbox Providers
15 Creative Double Mailbox Post Ideas for Your Front Yard
15 Creative Double Mailbox Post Ideas for Your Front Yard
MailMate: The Smart Solution for Getting Your Inbox to Zero
MailMate: The Smart Solution for Getting Your Inbox to Zero
Email Provider Mailbox.org launches one-time passwords and custom domain support - gHacks Tech News
Email Provider Mailbox.org launches one-time passwords and custom domain support - gHacks Tech News
How to Purge or Delete a Disconnected Mailbox in Exchange 2007 - geekyprojects.com
How to Purge or Delete a Disconnected Mailbox in Exchange 2007 - geekyprojects.com
Command Component Purpose
Get-MailboxStatistics -Identity "UserAlias" Targets a specific user's data stream.
Select-Object DisplayName, TotalItemSize Filters the output to relevant size metrics.
ForEach-Object { $_.TotalItemSize.ToBytes() / 1GB } Converts the raw data into a clean GB float.
Sort-Object -Descending Organizes the list to highlight the largest consumers.
Export-Csv "Path.csv" Saves the data for external analysis or archiving.

Troubleshooting and Advanced Considerations

While the basic commands work well in healthy environments, administrators might encounter discrepancies if litigation hold or single item recovery features are enabled. These features can inflate the TotalItemSize because they store additional versions of items in the Recoverable Items folder. To get mailbox size in GB PowerShell Exchange 2016 accurately in these scenarios, you may need to factor in the TotalDeletedItemSize or use the Get-MailboxFolderStatistics cmdlet to drill down into specific folders like "Recoverable Items" to understand the storage distribution.

a mailbox with some papers in it
a mailbox with some papers in it
"MailStore Home" free software that backs up Gmail and Outlook etc and can transfer it to different mail software
"MailStore Home" free software that backs up Gmail and Outlook etc and can transfer it to different mail software
a man standing next to a black box
a man standing next to a black box
Mailbox Post Plans - DIY Step-By-Step Plans - Construct101
Mailbox Post Plans - DIY Step-By-Step Plans - Construct101
How to Organize Your Email with Smart Mailboxes in Apple Mail
How to Organize Your Email with Smart Mailboxes in Apple Mail
What Is a Virtual Mailbox? (And Why You Should Get One)
What Is a Virtual Mailbox? (And Why You Should Get One)
25 K Mail access base(fr,de) 100% private - Combo List - Combolist
25 K Mail access base(fr,de) 100% private - Combo List - Combolist
three mailboxes are on a wooden post in front of a tree and sidewalk
three mailboxes are on a wooden post in front of a tree and sidewalk
a man standing in front of a mailbox
a man standing in front of a mailbox
a mailbox with boxes in it sitting on the side of a road next to grass
a mailbox with boxes in it sitting on the side of a road next to grass
How Microsoft Outlook Helps Me Achieve Inbox Zero
How Microsoft Outlook Helps Me Achieve Inbox Zero
Mail.ru email backup software
Mail.ru email backup software
What is USPS Form 1583 and Why Do You Need It For Your Virtual Mailbox?
What is USPS Form 1583 and Why Do You Need It For Your Virtual Mailbox?
three mailboxes in front of a large house
three mailboxes in front of a large house
AD