Solved

Exchange Powershell mailboxes statistics

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

A procedure for exporting installed hotfix details of remote computers using powershell
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 …
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 basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

821 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