How to export a total item count in public folder?

Joseph Huang 1 Reputation point

How to export a total item count in public folder? I don't need any list names return, just a number of total item count. thanks. We have zillions items and folders. This simple powershell command won't do anything since we have a lot of subfolder and items.
Get-PublicFolderStatistics -Identity \Marketing | Format-List

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,247 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JiayaoZhu 3,911 Reputation points


    Thanks for posting on our forum!

    Based on your demand, if you mean you want to know the size of your total item, you can run command:
    Get-PublicFolderItemStatistics -Identity "\Marketing\Reports" | MessageSize | Export-CSV C:\PFItemStats.csv
    This example exports the output of the cmdlet to the PFItemStats.csv file that contains the size of the item.

    If you want to know how many numbers of your total item, you can run these commands:
    Get-PublicFolderStatistics -Server <servername> | Export-Csv c:\file1.txt (on an Exchange 2007 server), or
    Get-PublicFolderStatistics -Server <servername> -ResultSize unlimited | Export-Csv c:\file1.txt
    (on an Exchange 2010 server)

    You can also gain more information about how to export the count of your total item from this article:

    Thanks for your support! Besides, if you think my work is helpful, would you please help me Accept Answer. An accepted blog can be put on top of our forum, so that people who have a similar issue can get access to their solution more quickly.


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments