Hi experts
i want to pull the report of all my user in the below format please refer attachment , experts please help me on this
User |
Mailbox Quota |
Mailbox Usage |
Archive Quota |
Archive Usage |
Archive Warning Quota |
Retention Policy for Archive Mailbox |
User1 |
|
|
|
|
|
|
User2 |
|
|
|
|
|
|
7 Spice ups
let’s see the script you’ve done so far.
Rod-IT
(Rod-IT)
3
As above - what do you have so far, what version of exchange/Office 365 is this?
bbigford
(bbigford)
4
Are you asking is to write you script for you?
We can certainly help you make modifications on something you might have started.
If you haven’t started on the script, try this… Get-Mailbox (ExchangePowerShell) | Microsoft Learn
If you use a “Get-MailboxStatistics | Format-List “ you will see everything you want in there.
You can then use select to get the correct data.
If you wanted to do it for multiple mailboxes you can use Get-Mailbox and pipe it through as well.
We can display name and mailbox size info in one command:
Get-Mailbox -ResultSize unlimited |Get-MailboxStatistics | Select DisplayName, TotalItemSize
If we want to get mailbox size, archive size, we need to use the script below:
Get basic statistics of Archived Mailboxes in Exchange
https://gallery.technet.microsoft.com/Get-basic-statistics-of-b35fff8a#content
but please note this script will display the mailboxes enabled archived:

Foreach($users in Get-Mailbox -ResultSize Unlimited){$users | Foreach-Object {
$user = $_
$stats = Get-MailboxStatistics $user.Name
$archiveStats = Get-MailboxStatistics $User.name -Archive
New-Object -TypeName PSObject -Property @{
DisplayName = $User.DisplayName
IssueWarningQuota = $User.IssueWarningQuota
ProhibitSendQuota = $User.ProhibitSendQuota
ProhibitSendReceiveQuota = $User.ProhibitSendReceiveQuota
MailboxUsage = $stats.TotalItemSize
ArchiveQuota = $User.ArchiveQuota
ArchiveWarningQuota = $User.ArchiveWarningQuota
ArciveUsage = $archiveStats.TotalItemSize
RetentionPolicy = $User.RetentionPolicy
}
} |Export-CSV C:\Stats.csv -NoTypeInformation -Append
}
1 Spice up
The above one worked for me