get mailbox size in gb powershell exchange 2016

Check Mailbox Size in GB using PowerShell in Exchange 2016

By Mark King
AD

So, you're an Exchange 2016 administrator looking to check mailbox sizes? It's a common task, especially with newer Execute PowerShell scripts responding to increasing storage demands. But how do you get mailbox size in GB using PowerShell? Let's dive in.

Exchange 2016 uses a complex storage system, and understanding how to manage it is crucial for efficient resource utilization. You may have heard about the Mailbox _StorageQuotasHidden property, but what if you want to see the mailbox size in GB? Let's explore a couple of methods – using the Exchange Management Shell and a more straightforward PowerShell approach.

Using Exchange Management Shell

The Exchange Management Shell (EMS) is a robust tool for managing your Exchange server. Here's how you can use it to get mailbox sizes:

AD
an image of a cell phone with measurements on it
an image of a cell phone with measurements on it
Pony Express, Rural Mailbox Regulations, Installing A Wall-mounted Mailbox, U.s. Mail Box Dimensions, Us Mailbox, Mailbox With Farm Sign
Pony Express, Rural Mailbox Regulations, Installing A Wall-mounted Mailbox, U.s. Mail Box Dimensions, Us Mailbox, Mailbox With Farm Sign
a bunch of boxes that are on top of a wooden bench in the grass near some trees
a bunch of boxes that are on top of a wooden bench in the grass near some trees

First, run the following command to display all mailbox sizes in your organization:

```powershell Get-Mailbox | Format-Table Name,TotalItemSize(GB) ```

This command gets all mailboxes and formats the output to display the mailbox name and total mailbox size in GB. If you want to pipeline further for sorting, you can replace `Format-Table` with `| Sort-Object TotalItemSize`.

three mailboxes are placed on top of a wooden box in front of a house
three mailboxes are placed on top of a wooden box in front of a house
a mailbox in front of a house with the letter ub mail on it
a mailbox in front of a house with the letter ub mail on it
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

Getting Detailed Mailbox Size Information

To get more detailed information, like the size of each mailbox folder, use the Get-MailboxFolderStatistics cmdlet. Here's an example:

```powershell Get-MailboxFolderStatistics "user@domain.com" | Select-Object FolderAndSubfolders,FolderSize(GB) ```

This command gives you the size of each folder (including subfolders) for a specified mailbox, again in GB. You can replace `"user@domain.com"` with `'$(_)` to get the sizes for all mailboxes, and pipe the output to sort by folder size.

AD

Exporting Mailbox Size Data

Sometimes, you might want to export the mailbox size data for further analysis or backups. Use the following command to export mailbox sizes to a CSV file:

the mailbox is displayed in an email box
the mailbox is displayed in an email box
a row of mail boxes sitting on top of a wooden pole next to rocks and grass
a row of mail boxes sitting on top of a wooden pole next to rocks and grass
a black and brown sign sitting on top of a grass covered field next to a sidewalk
a black and brown sign sitting on top of a grass covered field next to a sidewalk
Easy Steps To Recover Deleted Mailbox Items From Exchange Server - Codecondo
Easy Steps To Recover Deleted Mailbox Items From Exchange Server - Codecondo
three mailboxes are built into the side of a stone wall in front of a house
three mailboxes are built into the side of a stone wall in front of a house
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
```powershell Get-Mailbox | Select-Object Name,TotalItemSize(GB) | Export-Csv -Path C:\MailboxSizes.csv -NoTypeInformation ```

Using PowerShell ISE with Redemption in Exchange 2016

Another approach is using the Redemption PSTVw rescanning tool with PowerShell ISE. Redemption is a third-party tool designed to work with Exchange servers. Here's how to use it:

First, download and install the Redemption PSTVw tool from the official website. Then, in PowerShell ISE, run the following commands:

AD
```powershell Add-Type -AssemblyName Redemption $rds = [Redemption.RDS.Cache]::Sesion("Domain", "Username", "Password") $rds.Logonsite() $rds.CommitChanges() $rds = $null Get-PersonalFolderStatistics -Identity "user@domain.com" -FolderFields "All" | Select-Object FolderPath,FolderSize(GB) ```

The first few lines set up the Redemption session and authenticate with your Exchange server. The final command retrieves the mailbox size for the specified user, including folder and subfolder sizes in GB.

In Exchange 2016, managing mailbox sizes is crucial for maintaining optimal performance and preventing storage issues. Armed with these PowerShell methods, you can effectively monitor and manage mailbox sizes in your organization.

Remember, regular audits and proactive management are key to keeping your Exchange server healthy. Stay on top of mailbox sizes, and you'll minimize the risk of unexpected storage-related problems. Happy managing!

AD
AD