[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2147
  • Last Modified:

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

Thanks
Nathan
0
nathanq8
Asked:
nathanq8
3 Solutions
 
theruckCommented:
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”
0
 
theruckCommented:
In order to confirm the status of the mailbox export request we can run:

Get-MailboxExportRequest

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
0
 
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.

Thanks
0
 
suriyaehnopCommented:
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
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now