Check mailbox size powershell
You can use the following PowerShell command to check the size of your mailbox:
Get-MailboxStatistics -Identity <YourMailboxName> | Select-Object -ExpandProperty TotalItemSize
Replace <YourMailboxName>
with the actual name of your mailbox.
This command uses the Get-MailboxStatistics
cmdlet to retrieve information about the mailbox, and then pipes the output to the Select-Object
cmdlet to extract the TotalItemSize
property, which represents the total size of the mailbox in bytes.
You can also use the following command to get the mailbox size in a more human-readable format:
Get-MailboxStatistics -Identity <YourMailboxName> | Select-Object -ExpandProperty TotalItemSize | Format-Table -Property TotalItemSize -FormatString "{0:0.##} MB"
This command uses the same Get-MailboxStatistics
cmdlet, but pipes the output to the Format-Table
cmdlet to format the output as a table with a single column, TotalItemSize
, and a custom format string that displays the size in megabytes (MB) with one decimal place.
Note: You need to have the Exchange PowerShell module installed and imported to use these commands. You can import the module by running the following command:
Import-Module -Name Exchange