exchange 2010 all users allocated mailbox size

Hi All,

i am unable to export exchange 2010 all users mailbox size allocation details. any one know good commond to export all users allocated mailbox quota detail
rajanish tripathiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mahesh SharmaCommented:
Use below as a powershell script (.ps1), let me know if it helps
0
Mahesh SharmaCommented:
#############################################################################
#       Author: Mahesh Sharma
#       Date: 06/12/2012
#       Description: Extract the quota for all users
#############################################################################

# Add Exchange Shell...

If ((Get-PSSnapin | where {$_.Name -match "Exchange.Management"}) -eq $null)
{
      Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
}

#format Date

$date = get-date -format d
$date = $date.ToString().Replace(“/”, “-”)

$output = ".\" + "QuotaReport_" + $date + "_.csv"


#create a collection to hold results(dynamic array)

$Collection = @()
Get-Mailbox  -Database LAW-B -ResultSize Unlimited | foreach-object{
$st = get-mailboxstatistics $_.identity
$TotalSize = $st.TotalItemSize.Value.ToMB()
$user = get-user $_.identity


 
$mbxr = “” | select DisplayName, RecipientType,TotalItemSizeinMB, QuotaStatus,
UseDatabaseQuotaDefaults,IssueWarningQuota,ProhibitSendQuota,ProhibitSendReceiveQuota,
Itemcount, Email,ServerName,Company,Hidden, OrganizationalUnit,
RecipientTypeDetails,UserAccountControl
 
$mbxr.DisplayName = $_.DisplayName
$mbxr.RecipientType = $user.RecipientType
$mbxr.TotalItemSizeinMB = $TotalSize
$mbxr.QuotaStatus = $st.StorageLimitStatus
$mbxr.UseDatabaseQuotaDefaults = $_.UseDatabaseQuotaDefaults
$mbxr.IssueWarningQuota = $_.IssueWarningQuota.Value
$mbxr.ProhibitSendQuota = $_.ProhibitSendQuota.Value
$mbxr.ProhibitSendReceiveQuota = $_.ProhibitSendReceiveQuota.Value
$mbxr.Itemcount = $st.Itemcount
$mbxr.Email = $_.PrimarySmtpAddress
$mbxr.ServerName = $st.ServerName
$mbxr.Company = $user.Company
$mbxr.Hidden = $_.HiddenFromAddressListsEnabled
$mbxr.RecipientTypeDetails = $_.RecipientTypeDetails
$mbxr.OrganizationalUnit = $_.OrganizationalUnit
$mbxr.UserAccountControl = $_.UserAccountControl

$Collection += $mbxr
}
 
#export the collection to csv , change the path accordingly

$Collection | export-csv $output

#######################################################################################
0
Mahesh SharmaCommented:
Please modify Get-Mailbox  -Database LAW-B -ResultSize Unlimited to
Get-Mailbox  -ResultSize Unlimited to get result for all mailboxes
0
Will SzymkowskiSenior Solution ArchitectCommented:
All you need to do this the following one liner...

This command will present values to the screen
Get-Mailbox -ResultSize "unlimited" | Select Name, *quota*

Open in new window


This command will export the results to a csv file.
Get-Mailbox -ResultSize "unlimited" | Select Name, *quota* | Export-csv "results.csv" -nti

Open in new window


That is all you need.

Will.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.