Solved

exchange

Posted on 2016-09-29
6
61 Views
Last Modified: 2016-09-30
is there any command lets in exchange 2007  I can check to find below


How many mailboxes are greater than 2Gb in size? and export in csv file

Get-MailboxStatistics -Server RED-MSG01 | Where {$_.TotalItemSize -gt 2GB} | `
   Sort-Object -Property TotalItemSize -Descending | Format-Table DisplayName,TotalItemSize | Export-CSV "C:\AllMailboxes.csv"

will above work
0
Comment
Question by:pramod1
6 Comments
 
LVL 8

Expert Comment

by:Leo
ID: 41822768
Get-MailboxStatistics | Sort-Object TotalItemSize -Descending| ft DisplayName,@{label=”TotalItemSize(MB)”;expression={$_.TotalItemSize.Value.ToMB()}},ItemCount,StorageLimitStatus | Where {$_.TotalItemSize -gt 2GB}
0
 

Author Comment

by:pramod1
ID: 41822770
I wrote above command , how can I output in csv file, I just need numbers
0
 
LVL 13

Expert Comment

by:Michael Machie
ID: 41822778
Add:
| out-file c:\ps-results\result.csv

Edit your save location and filename to fit your need.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:pramod1
ID: 41822792
users are in 3gig group which is AD group , how can run a command to get the count
0
 
LVL 14

Expert Comment

by:Todd Nelson
ID: 41822847
Despite giving "out-file" a CSV extension it does not output a CSV formatted file. If you want a CSV formatted file you need to use "export-csv".

Therefore, the command you will need is more like this...

Get-MailboxStatistics | Sort-Object TotalItemSize -Descending| Select-Object DisplayName,@{label=”TotalItemSize(MB)”;expression={$_.TotalItemSize.Value.ToMB()}},ItemCount,StorageLimitStatus | Where {$_.TotalItemSize -gt 2GB} | export-csv c:\mailstats.csv -notype
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 41823218
@pramod1, Only change you need to make in your code is to change Format-Table to Select-object

Get-MailboxStatistics -Server RED-MSG01 | Where {$_.TotalItemSize -gt 2GB} | Sort-Object -Property TotalItemSize -Descending | Select-Object DisplayName,TotalItemSize | Export-CSV "C:\AllMailboxes.csv" -nti

Open in new window


If you just need to view the count of users whose mailbox is greater than 2 G
(Get-MailboxStatistics -Server RED-MSG01 | Where {$_.TotalItemSize -gt 2GB} | Measure).Count

Open in new window


PS : Above commands will give mailboxes on servers RED-MSG01, if you have multiple servers on your environment..
Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Where {$_.TotalItemSize -gt 2GB} | Sort-Object -Property TotalItemSize -Descending | Select-Object DisplayName,TotalItemSize | Export-CSV "C:\AllMailboxes.csv" -nti

Open in new window

0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

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.
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
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…
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…

773 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