Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

How to Check Last Time the Managed Folder Assistant Ran on a Mailbox

August 26, 2023
in Blog, Exchange Online, Powershell
4
ADVERTISEMENT

Table of Contents

MFA and Exchange Online

The Managed Folder Assistant (MFA) is an important component in the application of data governance policies for Exchange Online mailboxes. Not only does MFA apply Exchange mailbox policies to mailboxes, it also applies Microsoft 365 retention policies and DLP policies. And it makes sure that Teams compliance records are cleaned up according to the Teams-only retention policies.

MFA Workcycle

Exchange Online uses a workcycle policy to run MFA. The goal is to process mailboxes at least once weekly. Experience is that MFA usually performs better than this and that you can expect to have mailboxes processed twice a week.

However, apart from noticing that some messages have been moved from a folder (perhaps to the Deleted Items folder), there’s no obvious outward sign that MFA has processed a mailbox. Unless that is you look at the mailbox properties, which is where Exchange notes the progress of MFA.

Run diagnostics on archive mailboxes

You can run an automated diagnostic check on a user’s archive mailbox to identify any problems and suggested resolutions.

1️⃣ To run the diagnostic check, visit https://aka.ms/PillarArchiveMailbox  then sign-in using a global admin account.

2️⃣ A flyout page opens in the Microsoft 365 admin center. Enter the email address of the mailbox you want to check and click Run Tests.

Bg1375

3️⃣ Once done, you can see last time the Managed Folder Assistant ran on the mailbox.

If you want to force the Managed Folder Assistant runs immediately, please read this article.

Bg1374

Check Last Time the MFA runs using PowerShell

Another way, you can using PowerShell to get user mailbox and extract information about MFA processing for the mailbox.

1️⃣ Connect to Exchange Online PowerShell.

Or you can right click on the Windows Start icon then open Windows PowerShell Admin ( or Windows Terminal Admin in Windows 11). Then copy then paste all below commands into PowerShell window at once to install modules and connect to EXO PowerShell.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force;
Install-PackageProvider -Name NuGet -Force;
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted;
Install-Module -Name ExchangeOnlineManagement;
Import-Module ExchangeOnlineManagement;
Connect-ExchangeOnline;

2️⃣ Copy then paste all below command into PowerShell window at once to check last time MFA ran on a single mailbox.

$logProps = Export-MailboxDiagnosticLogs [email protected] -ExtendedProperties
$xmlprops = [xml]($logProps.MailboxLog)
$xmlprops.Properties.MailboxTable.Property | ? {$_.Name -like "ELC*"}

3️⃣ In the result, check ELCLastSuccessTimestamp, this value is the last time MFA ran on the mailbox.

Name                                    Value
----                                    -----
ElcLastRunTotalProcessingTime           2474202
ElcLastRunSubAssistantProcessingTime    2467599
ElcLastRunUpdatedFolderCount            40
ElcLastRunTaggedFolderCount             1
ElcLastRunUpdatedItemCount              0
ElcLastRunTaggedWithArchiveItemCount    0
ElcLastRunTaggedWithExpiryItemCount     0
ElcLastRunDeletedFromRootItemCount      0
ElcLastRunDeletedFromDumpsterItemCount  0
ElcLastRunArchivedFromRootItemCount     5520
ElcLastRunArchivedFromDumpsterItemCount 0
ELCLastSuccessTimestamp                 7/30/2022 1:34:19 AM
ElcLastRunSkippedNoTagItemCount         0
ElcLastRunSkippedWithTagItemCount       0
ElcLastRunSkippedNotExcludedItemCount   0
ElcFaiSaveStatus                        SaveSucceeded
ElcFaiDeleteStatus                      DeleteNotAttempted

Check last time MFA ran for all accounts

If you want to check last time MFA ran on all Exchange online mailboxes on your organization. Let’s connect to Exchange Online PowerShell then run the below script.

$mailboxes = Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited
$report = @()
$i = 0
ForEach ($mailbox in $mailboxes) {
    $i++
    $LastProcessed = $Null
    Write-Progress -Activity "Scanning Mailbox $($mailbox.DisplayName)" -Status "Scanned: $i of $($mailboxes.Count)"
    $Log = Export-MailboxDiagnosticLogs -Identity $mailbox.UserPrincipalName -ExtendedProperties
    $xml = [xml]($Log.MailboxLog)  
    $LastProcessed = ($xml.Properties.MailboxTable.Property | ? {$_.Name -like "*ELCLastSuccessTimestamp*"}).Value   
    $ItemsDeleted  = $xml.Properties.MailboxTable.Property | ? {$_.Name -like "*ElcLastRunDeletedFromRootItemCount*"}
    If ($LastProcessed -eq $Null) {
        $LastProcessed = "Not processed"}

    $reportLine = [PSCustomObject]@{
            User          = $mailbox.DisplayName
            LastProcessed = $LastProcessed
            ItemsDeleted  = $ItemsDeleted.Value}      
        $report += $reportLine
    }
$report | Select User, LastProcessed, ItemsDeleted
#$report | Export-CSV C:\Scripts\Inboxsizes.csv
#$report | Out-GridView

LastProcessed: Show the last time Managed Folder Assistant ran on the mailbox.

No Processing for Small Mailboxes: MFA never processes a mailbox if it holds less than 10 MB of content or Online Archiving are not enable for the mailboxes. The result will returns Not processed.

User      LastProcessed         ItemsDeleted
----      -------------         ------------
Bon Ben   Not processed
Chris     7/30/2022 12:05:29 AM 0
Anna      Not processed
Tom       Not processed
Tonny     Not processed
Maria     7/30/2022 3:07:17 AM  0
May       7/30/2022 1:34:19 AM  0
David     7/30/2022 1:34:36 AM  0
Tommy Luk Not processed

Bonus: In case you don’t want to do it manually. We’ve created a PowerShell script to do it automatically. You just need to connect to Exchange Online PowerShell then run the below command:

irm bonguides.com/exo/ELCLastSuccessTimestamp | iex
t6gfbpaVpXCtkyNVXoi8ZRwSXQ9cQTuPidrfqsB3wzPxrmZFpnZSeragHPIk

The output would be redirected to a new PowerShell window as below:

TizNIgjfRLTA1PHiFCKWP9417zCNjB74tL9KQHgmtGbRNVaBlufbmWNs0GF8
5/5 - (1 vote)
Previous Post

Force Start Managed Folder Assistant to Archiving Emails in Microsoft 365

Next Post

How to Find Users Using Basic Authentication in Microsoft 365

Related Posts

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024
Ftr19

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

July 26, 2024
Ftr25

How to Update Windows Terminal in Windows 10/11

July 26, 2024

How to Disable The Beep Sound in WSL Terminal on Windows

July 26, 2024

Comments 4

  1. Albert says:
    2 years ago

    Hello, Thanks for this info, How many mails can Folder Assistant Process?

    Reply
    • bon says:
      2 years ago

      I think has no limitation on it except the quota of the archiving mailbox. (50GB for plan 1 and 1,5 TB for plan 2).

      Reply
  2. Viraj says:
    2 years ago

    Can this same command would work for exchange 2016 on-premises mailbox as well

    Reply
  3. bon says:
    2 years ago

    Yes, read more https://learn.microsoft.com/en-us/powershell/module/exchange/export-mailboxdiagnosticlogs?view=exchange-ps

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory