6. Creating and using archive mailboxes
Each user can have an alternate mailbox for archives. An archive
mailbox is used to store a user’s old messages, such as might be
required for executives and needed by some managers and users. In
Outlook and Outlook Web App, users can access archive mailboxes in much
the same way as they access a regular mailbox.
Archive mailboxes are created in one of two ways. The standard
approach is to create an in-place archive. Both on-premises Exchange
and Exchange Online use in-place archives by default. With hybrid
organizations, you also can use online archives. With an online
archive, the archive for an on-premises mailbox is created in the
online service.
Creating in-place archives
You
can create an in-place archive mailbox at the same time you create the
user’s standard mailbox. To create an in-place archive mailbox,
complete the following steps:
-
In Exchange Admin Center, select Recipients in the feature pane and
then select Mailboxes. Double-tap or double-click the entry for the
user’s standard mailbox. Any user that already has an archive mailbox
has “User (Archive)” as the mailbox type.
-
On the Mailbox Features page, select Enable under the Archiving heading.
-
With on-premises Exchange, if the mailbox had an archive previously
and that archive still exists, this archive is used in its original
location. Otherwise, the Create In-Place Archive dialog box is
displayed. If you want to specify a mailbox database rather than use an
automatically selected one, tap or click Browse to the right of the
Mailbox Database text box. In the Select Mailbox Database dialog box,
choose the mailbox database in which the mailbox should be stored, and
then tap or click OK. Mailbox databases are listed by name as well as
by associated server and Exchange version running on the server.
-
Tap or click Save. If an error occurs during mailbox creation, the
archive mailbox will not be created. You need to correct the problem
before you can complete this procedure and create the archive mailbox.
When you are working with Exchange Admin Center, you can enable
in-place archiving for multiple mailboxes as well. When you select
multiple mailboxes using the Shift or Ctrl keys, the details pane
displays bulk editing options. Scroll down the list of available
options and then tap or click More Options. Next, under Archive, tap or
click Enable.
The Bulk Enable Archive dialog box is displayed. If you want to
specify a mailbox database for the archives rather than use an
automatically selected one, tap or click Browse to the right of the
Mailbox Database text box. In the Select Mailbox Database dialog box,
choose the mailbox database in which the archive mailboxes should be
stored, and then tap or click OK.
Using Exchange Management Shell, you can create an archive mailbox
using the Enable-Mailbox cmdlet. The basic syntax is as follows:
Enable-Mailbox [-Identity] Identity -Archive [-Database DatabaseID]
such as:
Enable-Mailbox pocket-consultant.com/engineering/tonyg -archive
Because each user can have only one archive mailbox, you get an
error if the user already has an archive mailbox. Items in the user’s
mailbox will be moved automatically to the archive mailbox based on the
archive and retention policy. When you install Exchange Server, a
default archive and retention policy is created for all archive
mailboxes. This policy is named Default MRM Policy. Because of this
policy, email messages from the entire mailbox are moved to the archive
after two years by default.
For bulk editing, you can use various techniques. Generally, you’ll want to:
-
Ensure you are working
with mailboxes for regular users and not mailboxes for rooms,
equipment, and so on. To do this, filter the results based on the
RecipientTypeDetails.
-
Ensure the mailbox doesn’t already have an on-premises or online
archive. To do this, filter the results based on whether the mailbox
has an associated ArchiveGuid and the ArchiveDomain.
-
Ensure you don’t enable archives on mailboxes that shouldn’t have
them, such as the Discovery Search Mailbox. To do this, filter based on
the name or partial name of mailboxes to exclude.
Consider the following example:
Get-Mailbox -Database Sales -Filter {RecipientTypeDetails -eq 'UserMailbox'
-AND ArchiveGuid -eq $null -AND ArchiveDomain -eq $null -AND Name -NotLike
"DiscoverySearchMailbox*"} | Enable-Mailbox -Archive
In this example, Get-Mailbox retrieves all mailboxes for regular
users in the Sales database that don’t have in-place or online
archiving enabled and that also don’t have a name starting with:
DiscoverySearchMailbox. The results are then piped through
Enable-Mailbox to add an archive mailbox to these mailboxes.