Solved

Exchange Powershell mailboxes statistics

Posted on 2015-02-09
4
88 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
In this video we show how to create an Accepted Domain 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 Mail Flow >> Ac…
To show how to create a transport rule 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 Mail Flow >> Rules tab.:  To cr…

744 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