July 2017
Intermediate to advanced
648 pages
31h 9m
English
When viewing the value for the database size, you probably noticed that we see the total size in megabytes and in parentheses we see the value in bytes, rather than just seeing a single integer for the total size. The DatabaseSize property is of the type ByteQuantifiedSize, and we can use several methods provided by this type to convert the value if all we want to retrieve is a numeric representation of the database size.
For example, we can use the ToKB, ToMB, ToGB and ToTB methods of the DatabaseSize object to convert the value to kilobytes, megabytes, gigabytes, or terabytes. For example:
Get-MailboxDatabase -Status |
Select-Object Name,
@{n="DatabaseSize (MB)";e={$_.DatabaseSize.ToMb()}}
As you can see, this time ...
Read now
Unlock full access