Thursday, April 19, 2012

Get-PublicFolderStatistics - Couldn't find public folder on server

Using the Exchange Management Shell in Exchange 2010, if you try to get the statistics of a Public Folder PFolder on server ExchangeServer01 using the cmdlet Get-PublicFolderStatistics, you might get an error like the following

Get-PublicFolderStatistics PFolder -server ExchangeServer01
Couldn't find public folder {PFolder} on server {ExchangeServer01}
+ CategoryInfo          : InvalidData: (PFolder :PublicFolderIdParameter) [Get-PublicFolderStatistics], InvalidOperationException
+ FullyQualifiedErrorId : 785BD1AB,Microsoft.Exchange.Management.MapiTasks.GetPublicFolderStatistics

This seems to be a bug since the PublicFolder "PFolder" does exist!

A workaround for this is to add the parameters -ResultSize unlimited to the cmdlet. So modifying the above example with the new parameters,

Get-PublicFolderStatistics PFolder -server ExchangeServer01 -ResultSize unlimited

gives the correct results.

I hope this helps people since it surely had me baffled for a while.

The above is from

No comments: