Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-02-23
6
Medium Priority
?
356 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
[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
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

609 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