So I have the following script - whereby I want to export both Get-Mailbox information, and Get-MailboxStatistics information as I understand they both handle different aspects of the mailbox with regards to the information we can export about.
Get-Mailbox -Server Server01 -ResultSize unlimited |
Where {$_.UseDatabaseQuotaDefaults -eq $false} |
ft DisplayName,IssueWarningQuota,ProhibitSendQuota,@{label="TotalItemSize(MB)";expression={(Get-MailboxStatistics $_).TotalItemSize.Value.ToMB()}}
Problem 1: is I get no information in the TotalItemSize field when I run the script
Problem 2: If I add | Export-CSV C:\test.csv
I get garbage!
Any ideas?