Solved

Exchange Powershell mailboxes statistics

Posted on 2015-02-09
4
89 Views
Last Modified: 2015-02-23
Hi folks,

have a command:
 

Open in new window

Get-mailboxstatistics  -Database bronze -DomainController two.pp.contose.com | Where  {$_.DisconnectDate -ne $null} |  select DisplayName,TotalItemSize,TotalDeletedItemSize | export-csv c:\powershell\mailboxstatistics.csv

Open in new window


What can I do columns  TotalItemSize and TotalDeletedItemSize gave values, expressed in gigabytes?
0
Comment
Question by:nesher13
4 Comments
 
LVL 19

Expert Comment

by:Miguel Angel Perez Muñoz
ID: 40597839
try this:
Get-mailboxstatistics  -Database bronze -DomainController two.pp.contose.com | Where  {$_.DisconnectDate -ne $null} |  select DisplayName,TotalItemSize,TotalDeletedItemSize | ForEach-Object {$_.totalitemsize / 1GB -and $_.totaldeleteditemsize / 1Gb} | export-csv c:\powershell\mailboxstatistics.csv
0
 

Author Comment

by:nesher13
ID: 40597878
Miguel Angel Perez Muñoz

It does not work.
0
 
LVL 3

Accepted Solution

by:
Sudhir Bidye earned 500 total points
ID: 40597912
Get-Mailbox -Server ExchangeServerName | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select-Object DisplayName,@{Label="Size(Gb)"; Expression={$_.TotalItemSize.Value.ToGb()}} | ft -auto

http://exchangeserverpro.com/forums/powershell-corner/119-finding-top-10-biggest-mailboxes-exchange-server-using-powershell.html
0
 
LVL 53

Expert Comment

by:Will Szymkowski
ID: 40598357
You can also accomplish this using the below syntax.

Get-mailboxstatistics  -Database bronze -DomainController two.pp.contose.com | Where  {$_.DisconnectDate -ne $null} |  select DisplayName,@{Label="Total Item Size /GB";expression={[int]($_.TotalItemSize/1GB)}}, @{Label="Total Deleted Item Size /GB";expression={[int]($_.TotalDeletedItemSize/1GB)}} | export-csv c:\powershell\mailboxstatistics.csv -notypeinformation

Open in new window


Will.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

932 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

12 Experts available now in Live!

Get 1:1 Help Now