SOLVED

Recoverable Items Folder

Brass 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 $_.name -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 (Brass Contributor)
Solution

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.

1 best response

Accepted Solutions
best response confirmed by Rising Flight (Brass Contributor)
Solution

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.

View solution in original post