• Contact Us

    We will get back to you as soon as possible.

  • We do not collect personal information except to the extent you provide that information to use through email, your web browser or through our contact forms. We will not share, sell or otherwise provide non-public information to others without your consent.

  • This field is for validation purposes and should be left unchanged.

SIGN UP FOR OUR NEWSLETTER

  • We do not collect personal information except to the extent you provide that information to use through email, your web browser or through our contact forms. We will not share, sell or otherwise provide non-public information to others without your consent.

  • This field is for validation purposes and should be left unchanged.
Automating Archives – Exchange Online
Published on July 12, 2016
ThinkstockPhotos-481912395

Good afternoon,

I wanted to take a moment to touch on a hot topic concerning Exchange Online inplace archives, plus provide a simplified method to establish a standard-state across the organization.

Most businesses maintain strict and rigorous retention policies on data.  Retention policies extend throughout the organization from unstructured data, OneDrive, email, database information, etc.

Placing the limelight strictly on email; businesses have sought avenues to allow users the ability to off-load “dated” or “expired” email, from mailboxes, without purging (ouch) potentially important information. This is where email archives traditionally have been used.  Thankfully, with Office 365/Exchange Online (EOL), off-line archives are a thing of the past.

Beyond convenience, other considerations involve security – moving data out of the inbox so it is not widely accessible or available to prying eyes. Although a security element could spark such an initiative, providing archives can simply provide the luxury for users to move dated information out of their mailbox so they are not hampered or delayed in searching, productivity, etc..

By default, and although available, Exchange Online mailbox archives are not enabled. Additionally, there isn’t a single push-button to automatically enable archives on all new or existing mailboxes. Mailbox archives must be enabled through the EOL online tenant or via PowerShell script (ref:  TechNet Article).  However, many businesses are now automating this, along with many other settings, using self-healing PowerShell scripts.

The script below can be setup to run as a scheduled task, or manually executed, to routinely maintain a consistency of archive state across the organization.

###################################

# Version 1.0 May 2016

# www.yourdts.com

# Script to Automate Archive Settings

# Requires: Windows PowerShell Module for Exchange Online

# – Powershell Version 3.0 or above

# – Permissions to Exchange Online

###################################

Clear-Host

# Settings details

# Set the following to automatically Enable InPlace Archive

$AutoSetInPlaceArchive = $True

##### Start of Functions #####

# Enable In Place Archive

Function EnableEOLInPlaceArchive

{

Param ([Parameter(Mandatory=$True)] $MBObjIn)

if ($AutoSetInPlaceArchive)

{if ($MBObjIn.ArchiveStatus -ne “Active”)

{$MBObjIn | Enable-Mailbox -archive}}

}

##### End of Functions #####

##### Start of Script  #####

# Queries EOL for all mailboxes

$ArrEOL_MailboxObjs = get-mailbox -ResultSize Unlimited `

| where {$_.RecipientTypeDetails -ne “DiscoveryMailbox” -and `

$_.ArchiveStatus -ne “Active”} `

| Sort-Object DisplayName

# Cycles through each value in Array – ArrEOL_MailboxObjs

foreach ($EOL_MailboxObj in $ArrEOL_MailboxObjs)

{EnableEOLInPlaceArchive $EOL_MailboxObj}