Commands › Exchange Online
Get-MailboxFolderStatistics
Retrieve information about the folders in a specified mailbox, including the number and size of items in the folder, the folder name and ID, and other information. **Note**: In Exchange Online PowerShell, we recommend that you use the Get-EXOMailboxFolderStatistics cmdlet instead of this cmdlet. For more information, see Connect to Exchange Online PowerShell.
Quick start script
# Get-MailboxFolderStatistics — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org
# 2. Run and inspect
Get-MailboxFolderStatistics -Identity <GeneralMailboxOrMailUserIdParameter> -Database <DatabaseIdParameter> -StoreMailboxIdentity <StoreMailboxIdParameter> | Format-List
# 3. Export for evidence / drift tracking
Get-MailboxFolderStatistics | Export-Clixml .\MailboxFolderStatistics-$(Get-Date -Format yyyyMMdd).xml
Syntax — 3 parameter sets
Identity
Get-MailboxFolderStatistics [-Identity] <GeneralMailboxOrMailUserIdParameter>
[-Archive]
[-DiagnosticInfo <String>]
[-DomainController <Fqdn>]
[-FolderScope <ElcFolderType>]
[-IncludeAnalysis]
[-IncludeOldestAndNewestItems]
[-IncludeSoftDeletedRecipients]
[-ResultSize <Unlimited>]
[-SkipCount <Int32>]
[-UseCustomRouting]
[<CommonParameters>]
AuditLog
Get-MailboxFolderStatistics [[-Identity] <GeneralMailboxOrMailUserIdParameter>]
[-AuditLog]
[-DiagnosticInfo <String>]
[-DomainController <Fqdn>]
[-FolderScope <ElcFolderType>]
[-IncludeAnalysis]
[-IncludeOldestAndNewestItems]
[-IncludeSoftDeletedRecipients]
[-ResultSize <Unlimited>]
[-SkipCount <Int32>]
[<CommonParameters>]
Database
Get-MailboxFolderStatistics -Database <DatabaseIdParameter> -StoreMailboxIdentity <StoreMailboxIdParameter>
[-DiagnosticInfo <String>]
[-FolderScope <ElcFolderType>]
[-IncludeAnalysis]
[-IncludeOldestAndNewestItems]
[-IncludeSoftDeletedRecipients]
[-ResultSize <Unlimited>]
[-SkipCount <Int32>]
[<CommonParameters>]
Parameters (14)
Message Center changes mentioning this command
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.