View Public Folder Item Statistics

 

Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

You can view the following information about items within a specific public folder:

  • Type of item

  • Subject

  • Last user modification time

  • Last user access time

  • Creation time

  • Attachments

  • Message size

You can use this information to make decisions about what actions to take for your public folders, such as which public folders to delete. For example, you may want to delete a public folder if the items haven't been accessed for over two years, or you may want to convert a public folder that's being used as a document repository to another client access application.

Looking for other management tasks related to public folders? Check out Managing Public Folders.

Use the Shell to view item statistics for a specific public folder

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Public folders" entry in the Mailbox Permissions topic.

Note

You can't use the EMC to view item statistics for a specific public folder.

This example returns default statistics for all items in the public folder Pamphlets under the \Marketing\2010 path. Default information includes item identity, creation time, and subject.

Get-PublicFolderItemStatistics -Identity "\Marketing\2010\Pamphlets"

This example returns additional information about the items within the public folder Pamphlets, such as subject, last modification time, creation time, attachments, message size, and the type of item by piping the results of the Get-PublicFolderItemStatistics cmdlet to the Format-List cmdlet.

Get-PublicFolderItemStatistics -Identity "\Marketing\2010\Pamphlets" | Format-List

For detailed syntax and parameter information, see Get-PublicFolderItemStatistics.

Use the Shell to export the output of the Get-PublicFolderItemStatistics cmdlet to a .csv file

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Public folders" entry in the Mailbox Permissions topic.

Note

You can't use the EMC to export the output of the Get-PublicFolderItemStatistics cmdlet to a .csv file.

This example exports the output of the Get-PublicFolderItemStatistics cmdlet to the PFItemStats.csv file that includes the following information for all items within the public folder \Marketing\Reports:

  • Subject of the message (Subject)

  • Date and time that the item was last modified (LastModificationTime)

  • Whether the item has attachments (HasAttachments)

  • Type of item (ItemType)

  • Size of the item (MessageSize)

Get-PublicFolderItemStatistics -Identity "\Marketing\Reports" | Select Subject,LastModificationTime,HasAttachments,ItemType,MessageSize | Export-CSV C:\PFItemStats.csv

For detailed syntax and parameter information, see Get-PublicFolderItemStatistics.

Use AggregatePFData.ps1 to aggregate public folder statistics across all replicas

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Public folders" entry in the Mailbox Permissions topic.

The AggregatePFData.ps1 script aggregates and captures information collected from three cmdlets:

  • Get-PublicFolderItemStatistics

  • Get-PublicFolderStatistics

  • Get-PublicFolder

The following information is aggregated at the public folder level, and not at the item level:

  • Last user access and last user modification times

  • Owner of the public folder

  • Properties such as MailEnabled, HasRules, ItemCount, FolderType, HasModerator, and TotalItemSize

This example returns the aggregated data from the public folder Pamphlets under the \Marketing\2008 path.

Note

The Shell doesn't load scripts automatically. You must precede all scripts with a period followed by a backslash (.) For example, to run the AggregatePFData.ps1 script, type .\AggregatePFData.ps1. For more information, see Scripting with the Exchange Management Shell.

.\AggregatePFData.ps1 -Publicfolder "\Marketing\2008\Pamphlets"

 © 2010 Microsoft Corporation. All rights reserved.