Exchange: How to get Mailbox size in Exchange Shell?
Posted ***忘了时间的钟***
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Exchange: How to get Mailbox size in Exchange Shell?相关的知识,希望对你有一定的参考价值。
Get-MailboxStatistics cmdlet gives TotalItemSize which is the mailbox size. But the TotalItemSize doesn’t contain the mailbox size in numbers, it’s a PowerShell deserialized object.
This command displays the mailbox size from the value property:
(Get-MailboxStatistics -Identity username).TotalItemSize.Value
Example output: 10.43 GB (11,202,063,583 bytes)
But how to make it usable in creating reporting or other purpose. Convert that value to a string, split at ‘(‘ and take the first item in the split array. Here is the command that gives you usable mailbox size.
(Get-MailboxStatistics -Identity username).TotalItemSize.Value.ToString().Split(“(“)[0]
Example output: 10.43 GB
If you want in all in bytes, use this cmdlet:
(Get-MailboxStatistics -Identity username).TotalItemSize.Value.ToString().Split(“(“)[1].Split(” “)[0].Replace(“,”,””)
Example output: 11202063583
Hope it is helpful for you.
以上是关于Exchange: How to get Mailbox size in Exchange Shell?的主要内容,如果未能解决你的问题,请参考以下文章
How to Access the Exchange (2013/2016) Admin Cente
How to Deploy Exchange 2016 CU2
How to Deploy Exchange 2016 CU2
How to locate a path? - Unix & Linux Stack Exchange
How to attach multiple files in the Send Mail Task in SSIS
[同步电子邮件数据库]如何将电子邮件解析到数据库?(How to parse e-mail into database?)