In Exchange Server, Managed Folder Assistant (MFA) is a mailbox assistant that is used to apply and process message retention policies that are configured in retention policies. It uses the users' mailboxes retention policy settings for processing of items’ retention. Though the processing occurs automatically, you can use the Start-ManagedFolderAssistant PowerShell command to run the policies set to the mailbox immediately. There are various parameters that you can use with this command. Below, we will see how to use the Start-ManagedFolderAssistant command in Exchange Server.
Stepwise Instructions to Use the Start-ManagedFolderAssistant Command
Before running the Start-ManagedFolderAssistant command, you need to check the permissions and roles needed to run the command. To know the required permissions, you can run the following command:
This will give information on the roles and permissions needed to run the Start-ManagedFolderAssistant command.
You need to assign the required roles and permissions to the user which will be executing the procedure.
After assigning the permissions and roles, open the Exchange Management Shell (EMS) and run the command as given below:
This will start the retention policies that are set on the specified user.
To view the policies assigned to the user, go to the recipient’s properties in the Exchange Admin Center (EAC) and click on the Mailbox features. Here, check the item under the Retention Policy.
To check what the policy does, click on Compliance Management and then click on Retention Policies.
Here, you can see all the retention policies. Apart from viewing the associated retention tags, you can open the policy and update it depending on the company needs. There could be many policies set but only one policy can be assigned to a user.
You can also run the Managed Folder Assistant on all the mailboxes on the server by using the below command.
Before executing the command, you can use the WhatIf parameter in the command to simulate the process.
You can also use various parameters with the Start-ManagedFolderAssistant command.
You can use the -DomainController parameter in the command. This parameter specifies the domain controller, which is used by the command to read data or write data to or from the Active Directory. Here’s how to run the command with the DomainController parameter.
Sometimes, duplicate items in the Recoverable Items folder are created when a mailbox has Single Item Recovery enabled or is on Litigation Hold/In-Place Hold. If you need to remove the duplicate items from the Recoverable Items folder of the mailbox to reduce the folder size, you can use the -HoldCleanup parameter with the Start-ManagedFolderAssistant command (see the below example).
If you want to run the command on inactive mailboxes only, then you can use the InactiveMailbox parameter with the Start-ManagedFolderAssistant command. Inactive mailbox are mailboxes that are put on In-Place Hold or Litigation Hold before they’re soft-deleted.
In addition, you can also use the following parameters with the command:
- AggMailboxCleanup Parameter: To specify more aggressive processing if the items are not moving as required.
- Confirm Parameter: To specify if you want the command to show the confirmation prompt or not.
- FullCrawl Parameter: To recalculate the application of tags across the entire mailbox.
To Conclude
Above, we have explained how to use the Start-ManagedFolderAssistant command when you need to immediately run the retention policies set to the mailbox. However, sometimes, you need to run the folder assistant command when the retention policy is not working or the server has ended up with no disk space. In such cases, you need to create the policies and run them immediately. You can create an archive database and create the mailbox archives for the users, create the policies, and assign the policies to the users.
If the disk is out of space, then it may damage or corrupt the database. In this case, you can perform soft recovery using the native ESEUtil command. If the soft recovery doesn’t work, you need to perform the hard recovery. However, hard recovery is not recommended as it can lead to data loss.
Alternatively, to avoid data loss, you can use third-party Exchange repair tools which are professionally designed to repair corrupt databases. One such tool is Stellar Repair for Exchange. With this tool, you can open Exchange Server databases from any version of Exchange Server, with no size limit. You can then export user mailboxes, user archives, shared mailboxes, disabled mailboxes, and public folders to PST and other file formats. To speed things up, you can export the EDB file data directly to a new live Exchange Server database or Exchange Online (Office 365) with automatic mailbox matching and parallel exports. You can also use the tool to restore deleted and purged items from the corrupt database.