asked on
$GMSize = foreach ($m in get-mailbox -ResultSize Unlimited )
{
Get-MailboxStatistics $m | where {$_.TotalItemSize -ge "4GB"} | Select-Object @{Name="DisplayName";Expression={Get-Mailbox $m | select -ExpandProperty SamAccountName}}, TotalItemSize, ItemCount, Database, TotalDeletedItemSize,DeletedItemCount, LastLoggedOnUserAccount, LastLogonTime, LastLogoffTime
}
Cannot process argument transformation on parameter 'Identity'. Cannot convert the "Alexandru Gavris" value of type
"Deserialized.Microsoft.Exchange.Data.Directory.Management.Mailbox" to type
"Microsoft.Exchange.Configuration.Tasks.GeneralMailboxOrMailUserIdParameter".
+ CategoryInfo : InvalidData: (:) [Get-MailboxStatistics], ParameterBindin...mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-MailboxStatistics
+ PSComputerName : thomsons-mail01.t-bx.com