Solved

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

Posted on 2011-02-23
3
407 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
  • 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 500 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Set OWA language and time zone in Exchange for individuals, all users or per database.
A procedure for exporting installed hotfix details of remote computers using powershell
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

777 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