Wednesday, April 13, 2022

Check mailbox size and quota using Exchange Online PowerShell

 


This PowerShell script will allow you to check the size and quotas of an Exchange Online mailbox using PowerShell, so that you can easily see if the mailbox size exceeds the allotted space.

$UPN = "user@contoso.com"

# Add -Force to it when you need to update EXO V1.
Install-Module -Name ExchangeOnlineManagement -Force
Connect-ExchangeOnline -UserPrincipalName exchangeadmin@contoso.com

get-mailbox $UPN | get-mailboxstatistics | ft displayname, totalitemsize
Get-Mailbox $UPN | Select *quota*


Sources:


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.