Solved

Exchange 2007 poweshell script or any script to get a particular store mailbox sizes.

Posted on 2011-02-23
6
350 Views
Last Modified: 2012-05-11
Hi,

Exchange 2007 poweshell script or any script to get a particular store mailbox sizes.

Can anyone help me with this. All users in a store in a server to get the details into a CSV with name and mailbox size in MB.

regards
Raja
0
Comment
Question by:bsharath
  • 3
  • 3
6 Comments
 
LVL 4

Expert Comment

by:karim_hashish
ID: 34965931
Hello Raja,

If i understand your question correctly let me rephrase, you have for example a database named DB01 and you want to get the mailboxes in that database where for example the mailbox size is between 15 and 20 MB then export the the mailbox displayname and the size to a csv file.

If so kindly find the below code you can use to get the results you desire.

PS: the totalitemsize property specified in the below command are in KB.

IF you still have any concerns, don't hesitate to refer back

Best Regards,

Karim
Get-MailboxStatistics -Database "EX07\First Storage Group\Mailbox Database" | where {($_.totalitemsize -gt 9000) -and ($_.totalitemsize -lt 10000)} | select displayname, totalitemsize | export-csv c:\result.csv

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 34966787
Thanks
I will need all mailboxes and not finding with any limit
Extract all mailbox names and sizes to csv.
Also the database path that i need to mention in code. Where can i see it
0
 
LVL 4

Expert Comment

by:karim_hashish
ID: 34967630
Hello

Thanks for clarifying . in order to get the mailbox database identity try the below command first

Get-MailboxDatabase -Server servername | select identity

Then mark and copy the identity of the desired database

Then use the copied identity in the below command to export all mailboxes to a csv file

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

Hope it will help you

if you still have any problems don't hesitate to contact me back

Best Regards,

Karim
0
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.

 
LVL 11

Author Comment

by:bsharath
ID: 34967646
Thanks
I get the details in Bytes

"11131740B"

Can this be in MB please
0
 
LVL 4

Accepted Solution

by:
karim_hashish earned 500 total points
ID: 34968001
Hello

Kindly try to do this as below

Get-MailboxStatistics -Database "EX07\First Storage Group\Mailbox Database" | select displayname, @{Name="MailSize(MB)";Expression={"{0:N2}" -f($_.totalitemsize/1mb)}}} | export-csv c:\result.csv

I'll be waiting for your feedback.

Best Regards,

Karim

0
 
LVL 11

Author Comment

by:bsharath
ID: 34968031
Thanks a lot
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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 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

17 Experts available now in Live!

Get 1:1 Help Now