25 feb 2011

Exchange 2010/2007: How to Export, Mailbox quota and size into a text file

To Export, Mailbox quota and size into a text file, follow the instruction below:

1. Save this script as ps1 file type (i.e.: file.ps1)

Get-mailbox –server <YOUR EXCHANGE MAILBOX SERVER> -ResultSize unlimited |
ft DisplayName,IssueWarningQuota,ProhibitSendQuota,@{label="TotalItemSize(MB)";expression={(get-mailboxstatistics $_).TotalItemSize.Value.ToMB()}}
| Out-File PATH:\FILENAME.txt

2. Run the script in EMS

.\file.ps1

The output text file should be as below:

DisplayName                   IssueWarningQuota             ProhibitSendQuota                  TotalItemSize(MB)           
-----------                        -----------------                   -----------------                        -----------------           
Administrator                   unlimited                           unlimited                                25                      
Discovery Search Mailbox unlimited                           50 GB (53,687,091,200 bytes)  1625                      

1 commento: