?
Solved

Exchange Powershell mailboxes statistics

Posted on 2015-02-09
4
Medium Priority
?
96 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
[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
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 2000 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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video discusses moving either the default database or any database to a new volume.
Suggested Courses

765 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