Control the Managed Folder Assistant in Exchange 2007

When you apply a mailbox policy, it won’t take effect until the next time the Managed Folder Assistant processes it. This is also the case when you modify an existing mailbox policy.

The Managed Folder Assistant automatically runs on a nightly basis by default. There may be instances, however, when you need mailbox policy changes to take effect immediately. This requires you to manually start the Managed Folder Assistant.

To do so, open the Exchange Management Shell and enter the following command:

Start-ManagedFolderAssistant

The Managed Folder Assistant is resource intensive, so running it during busy working hours is a bad idea. The fix is to use an EMS command to determine which mailboxes use a given policy. Then you can pipe the output from that command into the Start-ManagedFolderAssistant command.

This runs the Managed Folder Assistant against mailboxes with recent mailbox policy changes — not against your entire Exchange organization. This means that policy changes are applied immediately without consuming an excessive amount of server resources. The full command to do so is:

$policy=(Get-ManagedFolderMailboxPolicy “<your policy name>”).DistinguishedName; Get-Mailbox –Filter {ManagedFolderMailboxPolicy –EQ $policy} | Start-ManagedFolderAssistant

The command creates a variable named $Policy, which is given the name of the recently modified mailbox policy. It then uses the Get-Mailbox command to retrieve a list of mailboxes to which the target mailbox policy is applied. Finally, the Managed Folder Assistant starts for those mailboxes.