locked
Script to Generate Report Mailbox Size & Quotas RRS feed

Answers

  • Hi,

    I have a test in my environment. you can use the following scripts to export the mailbox size and quota limits. In your case, please make sure that the file path is available.

    Get-Mailbox -Server EXCH2-CU1.CU1.COM -ResultSize unlimited | Where {$_.UseDatabaseQuotaDefaults -eq $false} | Select DisplayName,IssueWarningQuota,ProhibitSendQuota,@{label="TotalItemSize(MB)";expression={(get-mailboxstatistics $_).TotalItemSize.Value.ToMB()}} | Export-Csv "C:\test\UserMailboxSizes.csv" -NoTypeInformation

    Hope this can be helpful to you.

    Best regards,


    Amy Wang
    TechNet Community Support


    • Edited by Amy.WangModerator Wednesday, October 8, 2014 1:45 AM correction
    • Marked as answer by Aocox Friday, October 10, 2014 6:01 PM
    Tuesday, October 7, 2014 9:12 AM
    Moderator

All replies

  • Hi,

    I have a test in my environment. you can use the following scripts to export the mailbox size and quota limits. In your case, please make sure that the file path is available.

    Get-Mailbox -Server EXCH2-CU1.CU1.COM -ResultSize unlimited | Where {$_.UseDatabaseQuotaDefaults -eq $false} | Select DisplayName,IssueWarningQuota,ProhibitSendQuota,@{label="TotalItemSize(MB)";expression={(get-mailboxstatistics $_).TotalItemSize.Value.ToMB()}} | Export-Csv "C:\test\UserMailboxSizes.csv" -NoTypeInformation

    Hope this can be helpful to you.

    Best regards,


    Amy Wang
    TechNet Community Support


    • Edited by Amy.WangModerator Wednesday, October 8, 2014 1:45 AM correction
    • Marked as answer by Aocox Friday, October 10, 2014 6:01 PM
    Tuesday, October 7, 2014 9:12 AM
    Moderator
  • FT is used for Output formatting and not an effective use when you want to export data to a CSV File. Try below and let me know if it works~

    get-mailbox -server <server> -ResultSize unlimited | Where {$_.UseDatabaseQuotaDefaults -eq $false} | Select DisplayName,IssueWarningQuota,ProhibitSendQuota,@{label="TotalItemSize(MB)";expression={(get-mailboxstatistics $_).TotalItemSize.Value.ToMB()}} | Export-Csv MailboxQuotaDetails.Csv -NoTypeInformation


    M.P.K ~ ( Exchange | 2003/2007/2010/E15(2013)) ~~ Please remember to click “Vote As Helpful" if it really helps and "Mark as Answer” if it answers your question, “Unmark as Answer” if a marked post does not actually answer your question. ~~ This Information is provided is "AS IS" and confers NO Rights!!

    • Proposed as answer by PK M Tuesday, October 7, 2014 12:55 PM
    Tuesday, October 7, 2014 10:16 AM
  • You can sort of get the output by using a simple redirection

    ... > C:\Report.txt

    but it won't be a .csv file. Just what you'd see on the screen.

    Otherwise, just remove the ft link in the chain.


    OWA For SmartPhone

    Tuesday, October 7, 2014 11:37 AM
  • FT and Export-CSV = No-Go

    Use Select instead of FT and then Export-CSV....

    Wednesday, October 8, 2014 1:34 AM
  • Thanks is work for mi!

    Tks.

    Friday, October 10, 2014 6:01 PM