locked
I need a script where it gives the current mailox size of all the users the ORG and the office location of the user RRS feed

  • Question

  • I need a script where it gives the current mailox size of all the users the ORG and the office location of the user

    get-mailbox resultsize-unlimited | get-mailboxstatistics is not giving the required output .

    I need the statistics of every mailbox along with the users  office location.

    Wednesday, September 11, 2013 8:58 PM

Answers

  • Hi,

    Please try the command below, it will return the all the mailboxes on server01 :

    Get-MailboxStatistics -server server01 | select DisplayName, ItemCount, TotalItemSize, @{Name='Office';Expression={(get-mailbox $_.LegacyDN).office}} | sort TotalItemSize | ft  

    Hope it helps.

    Regards,

    Rebecca

    Thursday, September 12, 2013 9:18 AM

All replies

  • Pipe the results of the get-mailboxstatistics into a select-object cmdlet.

    . . . | select TotalItemSize,@{n='office';e={(get-mailbox $_.legacydn).office}}


    --- Rich Matheisen MCSE&I, Exchange MVP

    Wednesday, September 11, 2013 9:21 PM
  • Hi,

    I am using this but the result is not as coming as required

    Get-MailboxStatistics | Select-Object -property "DisplayName","TotalItemSize" | select TotalItemSize,@{n='office';e={(get-mailbox $_.legacydn).office}}

    Wednesday, September 11, 2013 9:56 PM
  • HI Rich ,

    Any more suggestion

    Wednesday, September 11, 2013 10:32 PM
  • Why are you using two "select" cmdlets???

    Get-MailboxStatistics | Select DisplayName, TotalItemSize, @{n='office';e={(get-mailbox $_.legacydn).office}}


    --- Rich Matheisen MCSE&I, Exchange MVP

    Thursday, September 12, 2013 1:39 AM
  • Hi,

    Please try the command below, it will return the all the mailboxes on server01 :

    Get-MailboxStatistics -server server01 | select DisplayName, ItemCount, TotalItemSize, @{Name='Office';Expression={(get-mailbox $_.LegacyDN).office}} | sort TotalItemSize | ft  

    Hope it helps.

    Regards,

    Rebecca

    Thursday, September 12, 2013 9:18 AM