I'm running the suggested script to get the PF Item size.
$pf=Get-PublicFolder "\MY\Public folder\Name\Here\" -Recurse -ResultSize unlimited;foreach ($i in $pf) {$s=Get-PublicFolderItemStatistics $i.EntryID;foreach ($r in $s) {if ($r -gt "38600") {$r.MessageSize,$r.PublicFolderName}}}
Here's the Output. What am I doing wrong?
Cannot compare "Microsoft.Exchange.Data.Storage.Management.PublicFolderItemStatistics" to "38600" because the objects are not the same type or the object "Microsoft.Exchange.Data.Storage.Management.PublicFolderItemStatistics" does not
implement "IComparable".
At line:1 char:211
+ ... mStatistics $i.EntryID;foreach ($r in $s) {if ($r -gt "38600") {$r.Me ...
+ ~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ExtendedTypeSystemException
+ FullyQualifiedErrorId : PSObjectCompareTo