locked
script to Export the mailbox size in Exchange 2007 from a list of users in a group RRS feed

  • Question

  • Hi,

    I need a script to Export the mailbox size in Exchange 2007 from a list of users in a specific group.

    I need the following details in script : Display Name , Mailbox Size, Description , Email ID/Primary SMTP Address, Department, Title.

    Kindly help if it is possible through a script.

    regards

    Supreet Singh

    Friday, April 30, 2010 5:57 AM

All replies

  • Hi,

    You can try something like this:

    Get-MailboxStatistics |where {$_.TotalItemSize -gt 1MB} | sort $_.TotalItemSize |FT DisplayName,ItemCount,TotalItemSize >c:\size.txt

    Make changed in attributes like size & the FT to get all the content that you need. 


    Ripu Daman Mina | MCSE 2003 & MCSA Messaging
    Friday, April 30, 2010 8:09 AM
  • Hi,

    I need a script to Export the mailbox size in Exchange 2007 from a list of users in a specific group.

    I need the following details in script : Display Name , Mailbox Size, Description , Email ID/Primary SMTP Address, Department, Title.

    Kindly help if it is possible through a script.

    regards

    Supreet Singh


    You can not get all the required info from any one command, so I think you will have to run 3 different commands for the properties of he mailbox which u want like this

    get-distributiongroupMember YourDG |foreach{

     $stats= get-mailboxStatistics $_.Identity
     $mailbox = get-mailbox $_.Identity
     $user = get-user $_.Identity
     Write-Host "`nTotalItemSize: $($stats.TotalItemSize)"
     Write-Host "DisplayName $($stats.DisplayName)"
     Write-Host "PrimarySmtpAddress $($mailbox.PrimarySmtpAddress)"
     Write-Host "Department $($user.Department)"
    }

    The problem is that 
    Display Name , Mailbox Size --> Get-MailboxStats command can get
    Description , Department, Title --> get-user command can get
    Email ID/Primary SMTP Address --> get-mailbox can get

    Also if your members of DL have identical PrimarySmtpAddress and WindowsEmailAddress then you can skip get-mailbox command and can use only get-mailboxstats and get-user commands on the members bcoz u can get windowsEmailAddress from get-user.

    Hope this helps
    Regards,

    Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
    Friday, April 30, 2010 10:40 AM
  • Hi,

     

    As Laeeq mentioned, you need to run 3 commands to get the information you want. How things are going? Any update?

     

    Thanks,

     

    Elvis

     

    Monday, May 3, 2010 7:40 AM