[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


Exchange 2007 Server-side archiving

Published on
9,724 Points
1 Endorsement
Last Modified:
The purpose of this is to allow you as an exchange administrator to archive large mailboxes by date. This, with a little bit of modification this can be scripted and scheduled to allow compliance with enterprise mail policies. This WILL NOT WORK CORRECTLY if the mailboxes are 20gb or over.

(I used a virtual machine for all of this)
32-bit O/S  (Windows XP is fine)
Microsoft Outlook 2007 installed
Exchange 2007 management tools
Sufficient Hard disk space for the mail you will be archiving.

[u] Assumptions [/u]
the machine mentioned above is running as the user "domain\mailboxadmin" and you will be archiving the mailbox "mailboxalias". "c:\pstfiles" is where you pst files will go after archiving.

[u] Permissions [/u]
once all of this is up and running, you need to ensure that the user that you will be running this from has FullAccess to the mailboxes you are archiving.
From the powershell,
Add-MailboxPermission -Identity mailboxalias -AccessRights FullAccess domain\mailboxadmin

this will grant your user access to the mailbox mailboxalias

[u] Archiving [/u]
the below command will move the emails prior to 30/12/2008 to c:\PSTFiles\mailboxname.pst . if you only want to copy and not move, simply remove "-deletecontent" from the command.  
export-mailbox -Identity MailboxAlias -EndDate "30/12/2008" -ExcludeFolders ,"\Contacts","\Journal","\Calendar","\Sync Issues","\Drafts","\Notes","\Tasks","\Outbox" -PstFolderPath C:\PSTFiles\ -DeleteContent -confirm:$false -BadItemLimit 1000

Open in new window

[u] Bulk Archiving [/u]
The below command will do the same for every mailbox in the Mailbox Database on the first storage group of the mailbox server MailServer
Get-Mailbox -Database "MailServer\First Storage Group\Mailbox Database" | export-mailbox  -EndDate "30/12/2008" -ExcludeFolders ,"\Contacts","\Journal","\Calendar","\Sync Issues","\Drafts","\Notes","\Tasks","\Outbox" -PstFolderPath C:\PSTFiles\ -DeleteContent -confirm:$false -BadItemLimit 1000

Open in new window


Featured Post

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Join & Write a Comment

This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
Check How effective MS Exchange Expert thinks Exchange Mailbox Recovery by SysTools IS. Visit the Official site to get detailed information:- https://www.systoolsgroup.com/exchange-recovery.html (https://www.systoolsgroup.com/exchange-recovery.h…
Other articles by this author

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month