PhoneGet Quote
US Sales: +1 888 720 9500
US Support: +1 844 245 1108
Intl: +1 925 924 9500
Aus: +1 800 631 268
UK: 0800 028 6590
CN: +86 400 660 8680

Direct Inward Dialing: +1 408 916 9890


PowerShell scripts to fetch public folder statistics

IT admins choose to mail-enable or disable public folders in Exchange Online to create an effective email delivery system for specific groups in an organization without actually giving employees control over the mailboxes.

Here are a few PowerShell scripts that help admins access statistics on public folders within their organization.

Fetch root public folder

Get-PublicFolder -ResultSize Unlimited

This PowerShell cmdlet uses the Get-PublicFolder command, without parameters, to return the root public folder object (IPM_SUBTREE).

Return all public folders

Get-PublicFolder -Identity "\Legal\Documents\Pending Litigation" -Recurse -ResultSize Unlimited

This PowerShell cmdlet returns the Pending Litigation public folder and all the public folders under it.

Get public folder statistics

Get-PublicFolderStatistics -Identity "\Marketing\2018\Pamphlets" | Format-List -ResultSize Unlimited

This PowerShell cmdlet returns data about the items within the public folder Pamphlets, with a piped command to format the list.

Export the output in a CSV file

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

This PowerShell cmdlet exports the following information about every email located in the public folder Reports to the PFItemStats.csv file: subject, last modification time, attachments, type of the item, and message size.

Why O365 Manager Plus is a better choice

With O365 Manager Plus, you can:

  1. Get a bird's-eye view of public folders, including mail-enabled ones, without having to type line after line of code.
  2. Easily export all these reports to PDF, HTML, CSV, and XLS formats, and schedule them to be emailed at designated intervals.

Reports for easy public folder management

Public Folders

Public Folders: See all the public folders available in your Office 365 setup, along with their names and paths.

Mail-enabled public folders

Mail Enabled Public Folders: View all mail-enabled public folders available in your Office 365 setup, including their display name, email aliases, creation date, and email addresses.

Mail-enabled public folder items

Mail Enabled Public Folder Items: Get an overview of the items present in mail-enabled public folders, with details such as item type, item size, last modification time, creation date, and item subject.

Mail Enabled Public Folder Statistics

Mail Enabled Public Folder Statistics: Access all the information you could need about mail-enabled public folders, such as their item count, owner count, creation date, deleted item sizes, and last modification time.

Public folder activity report

Public Folder Activity: Generate an audit trail of user activities in public folders, including details on who created which public folder and when, what operation was performed, and the status of the operation.

Advantages of O365 Manager Plus' reporting capabilities

Advanced filters: Use attribute and condition-based filters to get the data you require without lengthy PowerShell scripts.

Reports on historical data: PowerShell cmdlets retrieve data no older than seven to 180 days, but O365 Manager Plus can report on all data right from the date of installation.

Customizable dashboard: With O365 Manager Plus' customizable dashboard, you can add graphical representations of reports to help you take a quick look at the mail traffic summary, top email senders and receivers, client device usage, and more. Embed this dashboard in any of your webpages for constant monitoring.

Report scheduler: Reduce the overhead of generating reports manually by scheduling reports to be generated at regular intervals.

Export report: Export reports to PDF, XLS, HTML, or CSV formats, and email them to anyone who needs them.

Secure delegation: Securely delegate the task of report generation to technicians and IT staff without giving them full access to the Office 365 Admin Center.

A holistic Office 365 administration solution