Solved

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

Posted on 2011-02-23
3
391 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now