Browse All Articles
> Exchange 2007 Server-side archiving
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
[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