I need to get all Exchange user mailboxes (cloud) whose TotalDeletedItemSize is greater than 10 GB. This script works great:
Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | select DisplayName,TotalDeletedItemSize | Where {(($_.TotalDeletedItemSize -split " ")[0]) -gt 10}
But I also need the output to contain the ALIAS. If I pass the ALIAS using a select after the get-mailbox then the Get-MailboxStatistics throws an error.
-PipelineVariable
. for more info, look atGet-Help about_CommonParameters
. – Lee_Dailey