Introduction

This script will generate a report of the Exchange 2010 Public Folder Environment and Replication status. This blog post is the basis for checking the replication, which is comparing item counts of each public folder. This report returns general information, such as total number of public folders, total items in all public folders, total size of all items, the top 10 largest folders, and more. Additionally, it lists each Public Folder and the replication status on each server. By default, this script will scan the entire Exchange environment in the current domain and all public folders. This can be limited by using the -ComputerName and -FolderPath parameters.

 

By default, this script will just output the raw data from the report. The following object is returned for each Public Folder scanned:

PowerShell
Edit|Remove
Name                : MyFolder 
FolderPath          : \Folder1\SubFolder\MyFolder 
ItemCount           : 143 
TotalItemSize       : 926.4 KB (948,684 bytes) 
TotalBytes          : 948684 
ReplicationComplete : True 
Data                : {@{ItemCount=143; TotalItemSize=926.4 KB (948,684 bytes); ComputerName=EXCH01; Progress=100}, @{ItemCount=143 
                      ; TotalItemSize=926.4 KB (948,684 bytes); ComputerName=EXCH02; Progress=100}}

Property Value
Name The name of the Public Folder
FolderPath The full path of the Public Folder
ItemCount The total amount of items in the Public Folder
TotalItemSize The total size of items in the Public Folder
TotalBytes The total size of items in the Public Folder, in bytes.
ReplicationComplete Is replication complete for all servers that host this Public Folder?
Data An array of result data for each server the Public Folder is present on - see the following table for the properties of the data object

PowerShell
Edit|Remove
ItemCount     : 143 
TotalItemSize : 926.4 KB (948,684 bytes) 
ComputerName  : EXCH01 
Progress      : 100 
 
ItemCount     : 143 
TotalItemSize : 926.4 KB (948,684 bytes) 
ComputerName  : EXCH02 
Progress      : 100

Property Value
ComputerName The Exchange Server this public folder data object is for
Progress The progress (0-100) of replication of the Public Folder on this server.
ItemCount The total amount of items in the Public Folder
TotalItemSize The total size of items in the Public Folder

The script can also directly return HTML output. This is accomplished by specifying the -AsHTML switch.

Usage

For detailed usage information, please see this article at my blog.

In addition to the console output listed above, this script can natively save the HTML report to a file or send an email.

To save the HTML report to a file, use the -Filename parameter.

To send an email, use the -SendEmail switch, and specify the -From, -To, and -SmtpServer parameters (-Subject and -NoAttachment are optional.)

Sample Report

The following is a sample report. This is just for demonstation purposes, and the data has been changed, so may not exactly match up (i.e. largest public folders are not listed in the replication results).

Additionally, in the HTML report (either the file or attachment in email) provides a tooltip when hovering over a replication percentage. This will provide the exact item counts and sizes: