Improve company productivity with a Business Account.Sign Up


Exchange 2007 Mailbox Archive Database

Posted on 2010-11-29
Medium Priority
Last Modified: 2013-02-11
    I see a lot of export to *.PST files for archiving a mailbox or using some 3rd-party, but is there a way to the two separate scenarios?

#1 Ex-employee: Archive the mailbox to another E2K7 SP3 Standard Edition storage group or just another mail store in the same storage group and be accessible by either OWA and/or Outlook 2007?

#2 Older data: Instead of using Synchronization Filters (which, AFAIK, HAVE to be set per individual folder) have an archving process using either native Outlook 2007 and/or native E2K7 tools to migrate data to another storage group or another mail DB in the same storage group and yet be accessible by the same user of the original mailbox.

Environment is E2K7 SP3 Standard Edition. One storage group, with one mail database and one public folder database. public folder database is being used (mostly reference stuff like employee handbook, internal howto docs, department calendars, etc.).
Running on 2008 x64 SP2.

Question by:NetManaged
  • 2

Assisted Solution

Shack-Daddy earned 450 total points
ID: 34235773
I would go ahead and create an additional storage group to use for archiving purposes. I think #1 is easy to implement: just move the mailbox, change the password on the mailbox and delegate access to it for the users that should be able to access it.

Better not to create more than a single mailbox database per storage group. Doing so sometimes makes recovery of a single mailbox more complicated. General rule of thumb is to keep a 1:1 ration between storage groups and databases.

Another option for #2 is to set up auto-archiving to .pst that saves to a particular directory on the server, using the user alias as the file name, so that jstephens.pst would be the name of jstephens' archive. Then have a regular process that imports those archives using the import-mailbox script an dump them into a mailbox of your choice, possibly a mailbox called a-jstephens that jstephens has been delegated full access to and can reach from OWA or Outlook.

Or you could upgrade to Exchange2010 and pay for enterprise CALs and get the similar archive feature that it has.

Programs like GFI's MailArchiver with a SQL backend allow you to archive older mail into them and still have it be available to users via Outlook plug-in.

Author Comment

ID: 34239563

I had thought using a separate mail database and moving ex-employees mailboxes would be an option, but did not see any references to others using that method. Glad to see I was on the right track with that thought. I hadn't seen the rule of thumb regarding 1:1 ratio on storage groups and databases. Can you supply a reference on that?

When you are referring to #2 and using an auto-archiving process to PST files, are you stating to use a powershell script method for exporting e-mail based on Outlook AutoArchive type criteria and then import that same PST file into another mailbox in a separate storage group and database?
Auto-archiving to pst via client-side Outlook in this particular environment is not a desirable option due to the network topology (geographically dispersed offices, remote office workers, site-to-site VPN links,etc.).

If the auto-archiving you are describing uses a powershell or other scripted approach, do you have a working example of the export/import process as you have described?

LVL 30

Accepted Solution

Britt Thompson earned 1050 total points
ID: 34291007
I definitely second the GFI MailArchiver...It will do everything you want it to do and allow them to access their archived mail from within Outlook as well.

Here's my instructions for creating the Exchange export to PST script:


Exchange 2007 Server
32-bit operating system - *The Mailbox-Export command will not run on a 64-bit OS
Exchange 2007 Management tools - Install Exchange Management Tools
Windows Powershell
Outlook 2003 or 2007 installed on the machine running the script
A user (not the built-in Administrator) that is at least Exchange Organization Admin or an Exchange Server Admin

Creating a User to Export With

I create a super user by copying the built-in administrator account in AD. This gives me the privileges I need and Exchange deny privileges don't carry over.
Open the Exchange Management Shell and use the following command replacing the name of the mailbox database (this is the default) and your newly created username

Add-ADPermission -Identity "Mailbox Database" -User "username" -ExtendedRights Receive-As

Open in new window

After the command runs successfully this is the user account you'll need to be logged in with in order to run the scheduled pst backups. This is the same username you schedule the task to run as.

The Batch File

The batch file portion of this is the object that's scheduled to run at the time you choose. This batch file does nothing but call a Powershell command script (these can not be scheduled directly so the .bat file is required).

Batch File Creation

Create a text document and save it as pstexport.bat
Copy the following line into your text file replacing the file location within the curly brackets

Powershell -command "& { \\server\share\scripts\exch\pstexport.ps1 }"

Open in new window

(We'll create the pstexport.ps1 Powershell script in the next section)
Save the .bat file to the same location where the pstexport.ps1 will be saved (this does not have to be a server share)

The PS1 File

A PS1 file is a standard Powershell script file, like a shell script or vb script. This standard Powershell script will need to load the Exchange CmdLets included in the Exchange Management Shell. Once the CmdLets are loaded it will create a log file with the date and an extension.

PS1 File Creation

Create a text file and name it pstexport.ps1 and save it to the location you chose above.
Add the Exchange Powershell snap-in to include the CmdLets. Copy and paste the following into your ps1 file
Adding Exchange Snap In to execute Exchange CmdLets in this script
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin

Open in new window

Now, we need to create the log file variables that give the log files a unique name. Copy and paste the following below the previous section

#Log File Name Variables
$filedate=get-date -f "yy-MM-dd"

Open in new window

Last, we add the shell script that runs the Export-Mailbox command. In this case I export the mailboxes in a specific OU in Active Directory. Make the necessary adjustments to fit your exportation needs

#Exchange Shell Command to Export Mailboxes to PST
Get-Mailbox -OrganizationalUnit "Company Users" | Export-Mailbox -PSTFolderPath \\server\archive\pst -Confirm:$false > \\server\share\scripts\exch\logs\$filedate$fileext


Open in new window

You'll need to create the "logs" directory within the scripts directory to allow the logs to be created.


What you should have now is a share at \\server\share\scripts\exch that contains 2 files and 1 folder. The pstexport.bat, pstexport.ps1 and a logs directory. All you need to do is set the schedule to run your .bat file at whatever time you choose.


Remeber you need a 32-bit OS to run this command in the PowerShell and I recommend scheduling with Vista or XP unless you feel like fighting with privileges on the script when it tries to run. I setup a virtual machine just run this script.

Author Closing Comment

ID: 34343407
Thanks guys (and mod for the extra attention).
I'm splitting points with ShackDadday providing confirmation and additional wisdom on the archive storage group concept and the bulk to renazonse for a more fully fleshed-out answer to the auto-archive section.
Thank you again!

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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.

Join & Write a Comment

Using Granular Exchange Recovery Software to recover specific items from corrupt Exchange mailboxes. With Granular recovery techniques,  repair exchange mailbox and then move single items objects stored in Exchange EDB Files such as emails, contacts…
Microsoft has decided to launch the Exchange Server 2019 this year for its on-premise users. What’s new now Microsoft is going to serve its users? How good is it going to be on the current Exchange Server 2016? This blog is going to answer all queri…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit If you want to manage em…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question