Need PowerShell Script for Exchange 2007

Asked By 7060 points N/A Posted on -
qa-featured

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

SHARE
Best Answer by Sharath Reddy
Best Answer
Best Answer
Answered By 558910 points N/A #79205

Need PowerShell Script for Exchange 2007

qa-featured

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.

Answered By 0 points N/A #79206

Need PowerShell Script for Exchange 2007

qa-featured

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.

 

Login/Register to Answer

Related Questions