Let's break out his conversion: ::Round(($_.TotalItemSize.ToString().Split("(").Split(" ").Replace(",","")/1MB),0)įirst, he converts the TotalItemSize property to a string using a built-in method on the TotalItemSize property. Here is an example of the formula he uses in a calculated property: Get-MailboxStatistics -Identity gglass | Select-Object DisplayName, Expression=, ItemCount The calculated property formula I have always used comes from this Scripting Guy! blog post from Brian Jackett. In this case, we would need to manipulate the TotalItemSize value manually to extract the raw bytes in the string and convert them to the desired byte unit. The command will not return an error, but the calculated property would simply be blank. But these methods are not available when using a remote PowerShell session connected to the Exchange server (for example, this would apply to Exchange Online in Office 365). Now this is great if you run these commands in an Exchange PowerShell module window.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |