Hi guys!
I'm trying to test the new cmdlet agains a large group of users where commonly the classic query runs out of memory
Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq "UserMailbox"} | Get-MailboxFolderStatistics -FolderScope RecoverableItems | where{$_.Identity -like "*\Recoverable Items" -and $_.FolderAndSubfolderSize -ge 90GB}| Export-CSV -path XXXX
Trying the same but using the Get-EXO* version I'm getting a conversion error.
Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq "UserMailbox"} | Get-EXOMailboxFolderStatistics -FolderScope RecoverableItems | where{$_.Identity -like "*\Recoverable Items" -and $_.FolderAndSubfolderSize -ge 90GB}| Export-CSV -path XXXX
"Could not compare "682 KB (698,404 bytes)" to "96636764160". Error: "Cannot convert value "96636764160" to type "Microsoft.Exchange.Management.RestApiClient.Unlimited`1[Microsoft.Exchange.Management.RestApiClient.ByteQuantifiedSize]". Error: "Operation is not valid due to the current state of the object."" At line:1 char:155 + ... ems | where{$_.Identity -like "*\Recoverable Items" -and $_.FolderAnd ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : ComparisonFailure "
The classic query works but the new one doesn't. Any recommendation?
Thanks