Solved

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

Posted on 2011-02-23
6
353 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
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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.

726 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