Recoverable Items Folder

Frequent Contributor

Hi experts When i use the below syntax to pull the report of mailboxes who are having recoverable items folder more than 50GB, i am able to pull the report, but i am not getting correct report, After pulling the report i have noticed at least 5 to 10 users whose recoverable items folder are 100GB and they did not show me when i pulled from the below syntax. please guide me 

Get-Mailbox -ResultSize Unlimited | Foreach{Get-MailboxFolderStatistics $ -FolderScope RecoverableItems | Where{$_.FolderAndSubFolderSize -gt 50GB -and $_.Identity -like "*Recoverable Items*"}| Select Identity,folderandsubfoldersize} | export-csv "c:\Export.csv" -NoTypeInformation -Append


1 Reply
Best Response confirmed by Rising Flight (Frequent Contributor)

You are comparing apples vs oranges here. The Get-MailboxFolderStatistics cmdlet returns folder size values as a string, so using "$_.FolderAndSubFolderSize -gt 50GB" will not work.