Need PowerShell Script for Exchange 2007
Can anyone help me with a PowerShell script that I can use to retrieve a specific storage mailbox names and sizes into a text file or CSV. Would be helpful if i can get the sizes in MB.
Regards,
Surendar
Can anyone help me with a PowerShell script that I can use to retrieve a specific storage mailbox names and sizes into a text file or CSV. Would be helpful if i can get the sizes in MB.
Regards,
Surendar
The best way is this piece of PowerShell. You do have a lot of solutions available. But this is the easier and neat one
Get-MailboxStatistics -Database "Exchange server nameStorage Group namestore name" | select displayname, @{Name="MailSize(MB)";Expression={"{0:N2}" -f($_.totalitemsize/1mb)}} | export-csv c:result.csv
The portion in red is what you need to edit according to your site. Once edited paste it on the PowerShell editor in Exchange 2007 server. Hope this helps.
Hi,
I have here instructions below to display name and total item size when doing PowerShell script. What this do is to display the object from descending and the total number of size, count and the username it'll be displayed. This step is simple and straight forward. I know for sure that you can do these steps your own. It has only had a couple of lines, but for sure it'll display both Name Total Item Size and Item counts.
Here it is:
get-mailboxstatistics [username] | ft displayName, totalitemsize, itemCount
If you want to do the sorting, here's the setup:
Sort-object totalitemsize –descending
This will display the list of total item size in descending. There are codes that display all at once and the results are not so complicated. But as starters, study the codes and later, you'll get used to it. Master the basic and you'll be junior and senior programmer soon. Hope this helps.
Â