Link to home
Start Free TrialLog in
Avatar of Yashy
YashyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Trying to export Exchange 2010 mailbox statistics to CSV....not working.....

Hi guys

I'm running the following command line in Exchange 2010 shell:

Get-Mailbox -database "Mailbox Database 0154525136" | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount | Export-CSV C:\mailboxessize.csv

However, the yellow paragraph returned is strange and stops anything being outputted. I have attached the screenshot.

Any ideas? Your help is much appreciated

Thanks
Yashy
Mailboxdatabases.jpg
ASKER CERTIFIED SOLUTION
Avatar of Amit Kumar
Amit Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Yashy

ASKER

Thank you Amit.

I tried again, but sadly the same thing just happened even with no limits.
Avatar of Yashy

ASKER

Can I delete the discovery search mailbox?
No, dont ever do that, yoiu can move it to another DB but by removing this mailbox your Exchange will not perform well. This mailbox is required for compliance and in-place hold, this mailbox is created by Exchange installation self.
Avatar of Yashy

ASKER

Okay, so I will leave it. But then why are these errors happening? This stuff never used to happen in the past.
Can you create a new mailbox on this DB and login in it then have same e-mails sent/receive. Then check the same command, this warning is nothing but it is telling you that mailboxes those are available on DB have never logged in which happens when noone ever logged using OWA/Outlook.
Avatar of Yashy

ASKER

In the end I used this command
Get-MailboxStatistics -Database "Mailbox_Database_Name" | Select DisplayName, ItemCount, TotalItemSize | Sort-Object TotalItemSize -Descending | Export-CSV C:\MBSizes.csv

It worked. I'll close this and give you points.
Good to know that works and thanks.