In hybrid organizations, several features, including online
archives, are enabled by default. If you are unsure whether online
archives have been enabled for your hybrid deployment, enter Get-HybridConfiguration | fl
at a PowerShell prompt and then verify that the OnlineArchive flag is
set on the -Features parameter. To modify the hybrid configuration, you
can use Set-HybridConfiguration. However, do not use
Set-HybridConfiguration without a solid understanding of hybrid
configurations. Keep in mind that when you use the -Features parameter
with Set-HybridConfiguration, you must explicitly specify all the
features that you want enabled. Any feature that you omit will be
disabled.
In Exchange Management Shell, you create online archives using the
Enable-Mailbox cmdlet with the -RemoteArchive, -ArchiveDatabase, and
-ArchiveDomain parameters. The required -RemoteArchive parameter is a
flag that specifies you want to create the archive online. The optional
-ArchiveDatabase sets the name or GUID of the archive database in the
online organization. The optional -ArchiveDomain sets the fully
qualified domain name of the domain for the online organization.
Consider the following examples:
Enable-Mailbox -Identity [email protected] -RemoteArchive
Enable-Mailbox -Identity [email protected] -RemoteArchive -ArchiveDatabase
"D919BA05-46A6-415f-80AD-7E09334BB852" -ArchiveDomain
"pocket-consultant.onmicrosoft.com"
The first example creates the online archive using the default
database and online domain. The second example explicitly sets the GUID
of the database and domain parameters.
Managing archive settings
Whether you use
Exchange Admin Center or Exchange Management Shell, several other
parameters are set for archive mailboxes. The default name for the
archive mailbox is set as In-Place Archive – UserDisplayName,
such as In-Place Archive – Henrik Larsen. With on-premises Exchange,
the default quota and warning quota are set as 50 GB and 45 GB,
respectively. With Exchange Online, the default quota and warning quota
are set as 25 GB and 22.5 GB, respectively.
You can confirm the details for a user’s archive mailbox by entering the following command:
Get-Mailbox "Name" | fl name, alias, servername, *archive*
where name is the display name or alias of the user you want to work with, such as:
Get-Mailbox "Henrik Larsen" | fl name, alias, servername, *archive*
You can change the archive name and set quotas by using Set-Mailbox. The basic syntax is as follows:
Set-Mailbox [-Identity] Identity -ArchiveName Name
-ArchiveQuota Quota -ArchiveWarningQuota Quota
When you set a quota, specify the value with MB (for megabytes), GB (for gigabytes), or TB (for terabytes), or enter ‘Unlimited’ to remove the quota. Here is an example:
set-mailbox pocket-consultant.com/engineering/tonyg
-ArchiveQuota '28GB' -ArchiveWarningQuota '27GB'
For bulk editing, you can use Get-Mailbox to retrieve the user
mailboxes you want to work with and then apply the changes by piping
the results to Set-Mailbox. If you do so, ensure that you filter the
results appropriately. Consider the following example:
Get-Mailbox -ResultSize unlimited -Filter {RecipientTypeDetails -eq
'UserMailbox' -AND ArchiveGuid -ne $null} | Set-Mailbox -ArchiveQuota
'20GB' -ArchiveWarningQuota '18GB'
In this example, Get-Mailbox retrieves all mailboxes for regular
users in the entire organization that have archiving enabled. The
results are then piped through Set-Mailbox to modify the quota and
quota warning values.
In Exchange Admin Center, you manage archive settings by completing these 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, tap or click View Details under the Archiving heading.
-
To change the name of the archive mailbox, enter the new name in the Name text box.
-
To set a quota, enter the desired value in gigabytes in the Archive Quota combo box.
-
To set a quota warning, enter a quota warning in gigabytes in the Issue Warning At combo box.
To disable an archive mailbox, open the properties dialog box for
the user to the Mailbox Features page and then select Disable under the
Archiving heading. Tap or click Yes when prompted to confirm.
Real World
When you disable an archive mailbox for a user, the archive mailbox
is marked for deletion and disconnected from the user account. The
archive mailbox is retained according to the mailbox retention policy.
To connect the disabled archive mailbox to the existing mailbox, you
must use the Connect-Mailbox cmdlet with the -Archive parameter.
Otherwise, if you disable an archive mailbox for a user mailbox and
then enable an archive mailbox for that same user, a new archive
mailbox is created for the user.
When you are working with Exchange Admin Center, you can disable
in-place archiving for multiple mailboxes as well. When you select
multiple mailboxes using the Shift or Ctrl keys, the detail 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 Disable. When the Bulk Disable Archive dialog box is displayed,
tap or click OK.
In Exchange Management Shell, you can disable an archive mailbox by using Disable-Mailbox. The basic syntax is as follows:
Disable-Mailbox [-Identity] Identity -Archive
such as:
disable-mailbox pocket-consultant.com/engineering/tonyg -archive
For bulk editing, you can use a technique similar to the one discussed for enabling archives. Consider the following example:
Get-Mailbox -Database Sales -Filter {RecipientTypeDetails -eq 'UserMailbox'
-AND ArchiveGuid -ne $null} | Disable-Mailbox -Archive
In this example, Get-Mailbox retrieves all mailboxes for
regular users in the Sales database that have archiving enabled. The
results are then piped through Disable-Mailbox to remove the archive
mailbox from these mailboxes.