script to Export the mailbox size in Exchange 2007 from a list of users in a group
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
April 30th, 2010 8:57am
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
Free Windows Admin Tool Kit Click here and download it now
April 30th, 2010 11:09am
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
April 30th, 2010 1:40pm
Hi,
As Laeeq mentioned, you need to run 3 commands to get the information you want. How things are going? Any update?
Thanks,
Elvis
Free Windows Admin Tool Kit Click here and download it now
May 3rd, 2010 10:40am