Discover Public Folder Item Quantities

To determine the number of mail, calendar and contact items that are in your public folders, you'll need to run the following PowerShell script.

# Exchange Management Shell Script
#   This script can be run to count the number
#   of items that exist in all public folders starting
#   at the root.
# Set the execution policy
Set-ExecutionPolicy Unrestricted -Force
# Retrieve the credentials
$LiveCred = Get-Credential
# Create and import the PowerShell session for ExchangeOnline
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session
# Recursively go through all public folders counting the items
Get-PublicFolder -Recurse | Get-PublicFolderItemStatistics | Group-Object -Property ItemType -NoElement
# End Script

This will generate output giving the count and item name (IPM.Note for mail, IPM.Contact for contacts, and IPM.Appointment for calendar items).

Was this article helpful?
0 out of 1 found this helpful