Pages

Monday, June 3, 2013

Mailbox Size Report for Exchange Server 2010

Exchange Management Shell, Windows PowerShell, and DOS give us the ability to generate and automating detailed reports. In this recipe, I use these cmdlets to create and automating a report on all of the mailboxes database in the organization unit and send an alert email.

Use the below steps to generate a report of each mailbox in the organization unit,  export this report to a CSV file, and send a report email.

  1. Create a folder in C:\ drive. e.g (C:\demo)
  2. Open "Notepad" an copy the script below.
  3. Save this script in "demo" folder.
  4. Name this file. e.g (mailbox_report.ps1) * Look, the file extension is .ps1
  5. Click to close O/S (C:) window.

* You need change the email address and SMTP Exchange in the script, before you save it.

Now you are ready to run this script manually :)

Process automation


Following the below steps:
  1. Open "Notepad" and type the next command line:
powershell.exe -version 1.0 -command ". 'F:\Program Files\Exchsrv\Bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; C:\demo\mailbox_report.ps1"

     2.  Save this in C:\demo.
     3.  Name this file. e.g (mailbox_automation.bat) * Look, the file extension is .bat
     4.  Click to close O/S (C:) window.

* Maybe you need change the path "F:\Program Files\Exchsrv\Bin\RemoteExchange.ps1", this depend where you can find "RemoteExchange.ps1" script. By default Exchange Server is installed in C: \ drive, and you can find "RemoteExchange.ps1" script in this path "C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1".

     5.  Open "Task Scheduler" window.
     6.  In "Task Scheduler" window, click on "Task Scheduler Library".
     7.  In "Actions" panel click "Create Task".
     8.  In "Create Task" window, on "General" tab type a Name of the task, On "Change User or Group..." click and select an "Administrator" account.
     9.  In "Create Task" window, on "Triggers" Tab click on "New" and define the convenience schedule, then click OK.
   10.  In "Create Task" window, on "Action" tab click on "New" and click on "Browse...", and find where you created "mailbox_automation.bat", in this case (C:\demo\mailbox_automation.bat), then click OK.
   11. Click Ok to close "Task Scheduler" window, type the "User Name:" and "Password" in the Pop Up window and click OK.
   12. Right click on the new Task and click "Run".

END... :)

Thank you for visiting this blog.




1 comment:

  1. Very helpful article, thanks for sharing this procedures to generate exchange mailbox size report from exchange server, I already used automate exchange server reporting tool from http://www.lepide.com/exchange-reporter/ to generate automating detailed reports including SamAccountName, DisplayName, folder size, TotalItemSize. based on these csv files and provide facilitate to filter the reports up to the granular level and track mailbox traffic and mailbox content.

    ReplyDelete