?
Solved

Exchange mailbox stats. need to get the results in MB rather than bytes.

Posted on 2011-02-23
3
Medium Priority
?
435 Views
Last Modified: 2012-05-11
Hi,

Exchange mailbox stats. need to get the results in MB rather than bytes.

I have the below code from a expert. Can this be able to fetch in MB

Get-MailboxStatistics -Database "EX07\First Storage Group\Mailbox Database" | select displayname, totalitemsize | export-csv c:\result.csv

Regards
Raja
0
Comment
Question by:bsharath
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 34967839
Why don't you convert the bytes to MB when you received it ?

http://technet.microsoft.com/en-us/library/ee692684.aspx
0
 
LVL 11

Author Comment

by:bsharath
ID: 34967847
I get the stats from 20,000 mailboxes. Could be useful some way within the code
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 2000 total points
ID: 34967878
Convert the Get-MailboxStatistics output from Bytes to MB or GB in Exchange 2007.
http://aspoc.net/archives/2007/11/07/convert-the-get-mailboxstatistics-output-from-bytes-to-mb-or-gb-in-exchange-2007/


Customizing results
This is all fine and good, but having to figure out how big a mailbox is based on the number of bytes is more math than we should have to use. Fortunately, we can convert bytes to MB by replacing the “TotalItemSize” field with

@{expression={$_.TotalItemSize.Value.ToMB()}

http://www.petri.co.il/getting-mailbox-sizes-in-powershell.htm
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
This video teaches viewers about errors in exception handling.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question