I have exchange 2013 powershell script to get the output of all mailboxes and want the output .csv file it to be sent automatically as a email but excluding system mailboxes and mailboxes starts with Exchange*. But the below command doesn't gives output of all users, instead it reports only for the quota modified user accounts. How to get the report for the all users with below column.
NAME, EMAILID,DATABASEQUOTA,ISSUEWARNING,PROHIBITSENDQUOTA,PROHIBITSENDRECEIVEQUOTA,TOTALITEM,TOTALITEMSIZEINMB
Get-Mailbox
-ResultSize
Unlimited | Where {$_.UseDatabaseQuotaDefaults -eq
$false} | Select-Object
DisplayName, IssueWarningQuota, ProhibitSendQuota, @{label="TotalItemSize(MB)";expression={(Get-MailboxStatistics
$_).TotalItemSize.Value.ToMB()}}, @{label="ItemCount";expression={(Get-MailboxStatistics
$_).ItemCount}}, Database | Export-Csv
"C:\Scripts\UserMailboxSizes.csv"
NoTypeInformation
Experts! please help!