Forum Discussion

Rising Flight's avatar
Rising Flight
Brass Contributor
Aug 20, 2018
Solved

Recoverable Items Folder

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

 

  • 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.

  • 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.

Resources