The Exchange 2007 Wiki

Get-MailboxStatistics

See the MS TechNet Get-MailboxStatistics page for more info.

Examples:
Get-MailboxStatistics -Database "THEWALL\First Storage Group\Mailbox Database" | ft DisplayName, ItemCount, TotalItemSize
-This will return the Displayname, Item Count, and total item size for each mailbox.

Get-Help -more info output:

NAME
    Get-MailboxStatistics

SYNOPSIS
    Use the Get-MailboxStatistics cmdlet to obtain information about a mailbox,
     such as the size of the mailbox, the number of messages it contains, and t
    he last time it was accessed.

SYNTAX
    Get-MailboxStatistics [-Identity <GeneralMailboxIdParameter>] [-DomainController <Fqdn>] [<CommonParameters>]
    Get-MailboxStatistics -Database <DatabaseIdParameter> [-DomainController <Fqdn>] [<CommonParameters>]
    Get-MailboxStatistics -Server <ServerIdParameter> [-DomainController <Fqdn>] [<CommonParameters>]


DETAILED DESCRIPTION
    To run the Get-MailboxStatistics 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 Exchange Server 2007, see Permission Consider
    ations.
    On Mailbox servers only, you can use the Get-MailboxStatistics cmdlet without parameters. In this case, the cmdlet will return the statistics for all
    mailboxes on all databases on the local server.


PARAMETERS

  • Database <DatabaseIdParameter>
    The Database parameter specifies the name of the mailbox database. When you specify a value for the Database parameter, the Exchange Management Shell returns statistics for all the mailboxes on the database specified.

        You can use the following values:
        * Server\StorageGroup\Database
        * Server\Database
        * Database
        This parameter accepts pipeline input from the Get-MailboxDatabase cmdlet.

        Required?                    true
        Position?                    Named
        Default value
        Accept pipeline input?       True
        Accept wildcard characters?  false

  • Server <ServerIdParameter>
            The Server parameter specifies the server from which you want to obtainmailbox statistics. You can use one of the following values:
            * Fully qualified domain name (FQDN)
            * NetBIOS name
            When you specify a value for the Server parameter, the command returns statistics for all the mailboxes on all the databases, including recove
            ry databases, on the specified server. If you do not specify this parameter, the command returns logon statistics for the local server.
            This parameter accepts pipeline input from the Get-ExchangeServer and Get-MailboxServer cmdlets.

        Required?                    true
        Position?                    Named
        Default value
        Accept pipeline input?       True
        Accept wildcard characters?  false

  • DomainController <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.

        Required?                    false
        Position?                    Named
        Default value
        Accept pipeline input?       False
        Accept wildcard characters?  false

  • Identity <GeneralMailboxIdParameter>
            The Identity parameter specifies a mailbox. When you specify a value fo
            r the Identity parameter, the command looks up the mailbox that is spec
            ified in the Identity parameter, connects to the server where the mailb
            ox resides, and returns the statistics for the mailbox. You can use one
             of the following values:
            * GUID
            * Distinguished name (DN)
            * Domain\Account
            * User principal name (UPN)
            * Legacy Exchange DN
            * SmtpAddress
            * Alias
            This parameter accepts pipeline input from the Get-Mailbox cmdlet.

        Required?                    false
        Position?                    1
        Default value
        Accept pipeline input?       True
        Accept wildcard characters?  false

    <CommonParameters>
        This cmdlet supports the common parameters: -Verbose, -Debug,
        -ErrorAction, -ErrorVariable, and -OutVariable. For more information,
        type, "get-help about_commonparameters".

    Get-MailboxStatistics
    Get-MailboxStatistics -Server MailboxServer01
    Get-MailboxStatistics -Identity contoso\chris
    Get-MailboxStatistics -Database "Mailbox Database"
    Get-MailboxStatistics | Where {$_.DisconnectDate -ne $null}

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 7/15/08 11:03 AM