export mailbox in exchange 2010 using powershell

Hi experts,

 I was given task to archive a particular mailbox in exchange 2010. This mailbox have emails from last year( not good ! ).I have 2 problem to perform this task :

1. mailbox size is huge > 10G
2. lack of powershell scripting skills

* I do use powershell to perform simple things like report mailbox size

Requirement :

Create powershell script , that would able to export to PST for certain date (montly) and delete that time frame emails from the actual mailbox after exporting. The idea is to archive the old emails and bring back the mailbox to normal size ( < 1G) with only having emails from last month .

Please let me know if you need any more information. Let's just say ,
Mailbox name : bigbrother
domain :  pasta.com.au
Database : DB1
(fqdn) exchange server name : ex1.pasta.com.au

Who is Participating?
suriyaehnopConnect With a Mentor Commented:
You may try this Export-Mailbox (Exchange 2007) cmdlet to export data within the date ranges:

Export-Mailbox -Identity <MailboxIdParameter> -StartDate "<Month/Day/Year>" -EndDate "<Month/Day/Year>" -PSTFolderPath <Path_Of_PST_Folder>\<File_Name>.pst

Open in new window

Not sure it will work on Exchange 2010, I have no such exchange 2010 yet
theruckConnect With a Mentor Commented:
open the exchange management shell

In order to Export the entire mailbox content to a PST file we need to run the following command:

New-MailboxExportRequest –Mailbox bigbrother –FilePath “\\<servername>\Sharename\bibrother.pst”

if your username does not have access to export/import feature somebody needs to give you the right

New-ManagementRoleAssignment –Role “mailbox import export” –User “Admin”
theruckConnect With a Mentor Commented:
In order to confirm the status of the mailbox export request we can run:


checkitout here http://blogs.technet.com/b/sbs/archive/2011/05/09/how-to-import-and-export-mailboxes-using-pst-files-in-sbs-2011-standard.aspx
nathanq8Author Commented:
Thanks theruck,

I did try the command for other mailbox , it went all ok. How to change the script for specific range of date ?
 Is it possible to export the email to PST with specified date range and after completion delete the exported email from mailbox  ? The mailbox size is 10G ,
I won't able to run export in one go , it will slowdown the network and server performance . I tried once , it ran for 1.5 days for full PST over weekend.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.