Select Page
How to enable Archiving in Microsoft 365 exchange online

How to enable Archiving in Microsoft 365 exchange online

The Exchange admin center (EAC) lets you enable the archive mailbox only individually – for one user at a time. For bulk actions, refer to the section on using Windows PowerShell.
  1. Sign in to the Exchange admin center.
  2. Go to Recipients > Mailboxes to display the list of mailboxes.
  3. Click a user for whom you want to enable the archive mailbox. In the pane that opens, select the Others tab and click Manage mailbox archive

4. Next, set the toggle switch to Enabled and click Save.

4. Next, set the toggle switch to Enabled and click Save.

Note: It usually takes a few moments to create the archive mailbox in the EAC.

Creating Retention Tags

  1. In the Exchange (legacy) – Microsoft Purview go to Information Governance > Retention.
  2. Click the “+” icon to create a new retention tag.
  3. Give the tag a name, choose the type of retention and duration.
  4. Click save.

Applying a Retention Policy

  1. Go to Information Governance > Policies.
  2. Click “+” to create a new retention policy.
  3. Give the policy a name and select the retention tags to apply.
  4. Click save then refresh.
  5. Select the policy and click “Apply to content locations”.
  6. Choose the mailboxes or folders to apply the policy to.

Apply policy to user mailbox

  1. Click Mailbox
  2. Click Manage mailbox policies
  3. Select the Retention policy from the dropdown menu.

Exchange Online Managed Folder Assistant

Exchange Online runs the Managed Folder Assistant (MFA) weekly to process mailboxes per the retention policy schedule. To manually trigger MFA immediately, run this PowerShell command below as administrator.

This will start applying any retention policies right away instead of waiting for the normal cycle.

Powershell script to kick off MFA on exchange online

#Requires -RunAsAdministrator
$nameofuser = ""

# Close and re-open your PowerShell window when done

# Add -Force to it when you need to update EXO V1.
#Install-Module -Name ExchangeOnlineManagement -Force

Start-ManagedFolderAssistant –Identity $nameofuser

# Run a report to show you the status of when MFA was last run
$logProps = Export-MailboxDiagnosticLogs $nameofuser -ExtendedProperties
$xmlprops = [xml]($logProps.MailboxLog)
$xmlprops.Properties.MailboxTable.Property | ? {$_.Name -like "ELC*"}

The screenshot show a successful run of MFA of a user account on Exchange online

Create a local admin with PowerShell

Create a local admin with PowerShell

In this guide, we will how to setup a local administrator in windows 10 using PowerShell.

  1. Open Start on Window 10
  2. Search for Powershell ISE, right-click the top result and select Run as Administrator
  3. Copy and paste the code below into thePowerShell ISE editor and save as createAdmin.ps1

Edit the $Username=”New_Account_name” to the username you want. Edit the $Password to the Password you want it to be.

#Requires -RunAsAdministrator
$Username = "testuser"
$Password = "password123!"
$group = "Administrators"

$adsi = [ADSI]"WinNT://$env:COMPUTERNAME"
$existing = $adsi.Children | Where-Object { $_.SchemaClassName -eq 'user' -and $_.Name -eq $Username }

    Write-host "Calling local admin script"  -ForegroundColor Green

    if ($null -eq $existing) {
        Write-Host "Creating new local user $Username."
        & NET USER $Username $Password /add /y /expires:never
        Write-Host "Adding local user $Username to $group."
        & NET LOCALGROUP $group $Username /add
    else {
        Write-Host "Setting password for existing local user $Username."

    Write-Host "Ensuring password for $Username never expires."

Note: Keeping a password stored in Script would be considered a security risk, Consider replacing the $Password variable with code snippet below

$Password = Read-Host 'What is your password?' -AsSecureString