Exchange Power Shell Command

Posted on 2009-02-12
Medium Priority
Last Modified: 2012-05-06
How to export The Storage Quota settings of the Mailbox
Question by:Fauzan_Moosa
LVL 12

Accepted Solution

florin_s earned 1000 total points
ID: 23621415
LVL 71

Assisted Solution

by:Chris Dent
Chris Dent earned 1000 total points
ID: 23623289

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


Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

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

This article will help to fix the below errors for MS Exchange Server 2016 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
Exchange administrators are always vigilant about Exchange crashes and disasters that are possible any time. It is quite essential to identify the symptoms of a possible Exchange issue and be prepared with a proper recovery plan. There are multiple…
In this video we show how to create an Accepted Domain 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 Mail Flow >> Ac…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
Suggested Courses
Course of the Month15 days, 5 hours left to enroll

840 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