0

I want to get the TotalItemSize per database on Exchange 2013. I have tried this command to count the mailbox per database but I don't kjown how to get the TotalItemSize per database

Get-Mailbox -ResultSize 10 | Get-MailboxStatistics |  select-object DisplayName,database,{$_.TotalItemSize.Value.ToMB()} | Group-Object database

Any idea ?

Littlefish
  • 45
  • 1
  • 1
  • 5

1 Answers1

0

Have a look at this post.

Or try

get-mailboxdatabase | % { Get-Mailbox -database $_.name -ResultSize 10 | Get-MailboxStatistics |  select-object DisplayName,`
database,@{l=size;e={$_.TotalItemSize.Value.ToMB()}} | Measure-Object -sum size }

And yes, this code does only count 10 Mailboxes, as per -resultSize

There is also a direct cmdlet for getting the totalsize of a database:

Get-MailboxDatabase -Status | select Name, DatabaseSize
Community
  • 1
  • 1
Martin
  • 1,853
  • 3
  • 15
  • 22