We help IT Professionals succeed at work.

Exchange Power Shell Command

Fauzan_Moosa asked
Medium Priority
Last Modified: 2012-05-06
How to export The Storage Quota settings of the Mailbox
Watch Question

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Chris DentPowerShell Developer
Top Expert 2010

You do mean for Exchange 2007, right? It's possible with 2003, but rather different from this.

Anyway, this one is a bit over the top in that it returns rather more than you'd asked for. Hopefully the extra fields are useful.

You could just export $MailboxQuotas to a CSV, it has more fields than I display in the displayed output (item counts, deleted item size, last log off, etc, etc).

If you do want to export it to a CSV, run:

$MailboxQuotas | Export-CSV -File "yourcsv.csv"

The | FT at the end is Format-Table, just to make it possible to browse through the output without too much effort.

$MailboxQuotas = @()
ForEach ($Mailbox in Get-MailboxStatistics) {
  $User = Get-Mailbox $Mailbox.Identity -ErrorAction SilentlyContinue
  $MailboxQuotas += $Mailbox | Select-Object *, `
    @{n='UseDatabaseQuotaDefaults';e={ $User.UseDatabaseQuotaDefaults }}, `
    @{n='IssueWarningQuota';e={ $User.IssueWarningQuota }}, `
    @{n='ProhibitSendQuota';e={ $User.ProhibitSendQuota }}, `
    @{n='ProhibitSendReceiveQuota';e={ $User.ProhibitSendReceiveQuota }}
$MailboxQuotas | Select-Object DisplayName, TotalItemSize, StorageLimitStatus, LastLogonTime, `
  UseDatabaseQuotaDefaults, IssueWarningQuota, ProhibitSendQuota, ProhibitSendReceiveQuota | FT

Open in new window

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.