Sdílet prostřednictvím


Get-MailboxFolderStatistics

 

Applies to: Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

Use the Get-MailboxFolderStatistics cmdlet to 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.

Syntax

Get-MailboxFolderStatistics -Identity <MailboxIdParameter> [-DomainController <Fqdn>] [-FolderScope <Nullable>] [-IncludeOldestAndNewestItems <SwitchParameter>]

Detailed Description

To run the Get-MailboxFolderStatistics cmdlet, the account you use must be delegated the following:

  • Exchange View-Only Administrator role

For more information about permissions, delegating roles, and the rights that are required to administer Microsoft Exchange Server 2007, see Permission Considerations.

Note

A mailbox can have hidden items that are never visible to the user and that are only used by applications. The Get-MailboxFolderStatistics cmdlet can return hidden items for the following values: FolderSize, FolderAndSubfolderSize, ItemsInFolder, and ItemsInFolderAndSubfolders.

Note

The Get-MailboxFolderStatistics cmdlet should not be confused with the Get-MailboxStatistics cmdlet.

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter

The Identity parameter specifies the identity of the mailbox. You can use the following values:

  • GUID

  • ADObjectID

  • Distinguished name (DN)

  • Domain\Account

  • User principal name (UPN)

  • LegacyExchangeDN

  • Simple Mail Transfer Protocol (SMTP) address

  • Alias

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that retrieves data from the Active Directory directory service, include the DomainController parameter in the command.

FolderScope

Optional

System.Nullable

The FolderScope parameter specifies the scope of the search by folder type. Valid parameter values are as follows:

  • All

  • Calendar

  • Contacts

  • ConversationHistory

  • DeletedItems

  • Drafts

  • Inbox

  • JunkEmail

  • Journal

  • ManagedCustomFolder

  • Notes

  • Outbox

  • RssSubscriptions

  • SentItems

  • SyncIssues

  • Tasks

If the ManagedCustomFolder parameter value is entered, the command will return the output for all managed custom folders.

IncludeOldestAndNewestItems

Optional

System.Management.Automation.SwitchParameter

Include the IncludeOldestAndNewestItems parameter to return the dates of the oldest and newest items in each folder.

Input Types

Return Types

Errors

Error Description

Exceptions

Exceptions Description

Example

In this example, the Get-MailboxFolderStatistics cmdlet is used without the FolderScope parameter to retrieve all the information about the user named Chris in the Contoso domain.

Get-MailboxFolderStatistics -Identity contoso\chris