Skip to content

Exchange UnifiedContent folder keeps growing

The UnifiedContent folder in Exchange Server is increasing. After looking into it, it’s temporary files filling up the folder. Shouldn’t these files clear automatically? The answer is that it should. In this article, you will learn the solution to Exchange UnifiedContent folder keeps growing.

Why UnifiedContent folder grows

Exchange Server creates and manages temporary files in the UnifiedContent folder to assist antimalware scanning. Although the Microsoft Exchange Health Manager service runs a scheduled cleanup task on that folder, either of the following scenarios can cause the cleanup to fail:

  1. Move mail queue to another location in Exchange Server
  2. Didn’t install Exchange Server in the default location

The default location of the UnifiedContent folder is:

C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Temp\UnifiedContent

In our case, the UnifiedContent folder is in the below location because we moved the mail queue to the (Q:) drive.

Q:\TransportRoles\data\Temp\UnifiedContent

The UnifiedContent folder has been filling up with files since then.

Exchange UnifiedContent folder keeps growing before

Cleanup UnifiedContent with PowerShell script

Many ask if they should create a script that will run every day or week to clear up these files or to edit the Cleanup logs Exchange 2013/2016/2019 PowerShell script and add this folder path to it.

Yes, you can. But that’s not the cleanest approach because the Microsoft Exchange Health Manager service should run every couple of hours and clean up that folder.

Let’s have a look into that in the next step.

Solution to UnifiedContent folder filling up

To change the UnifiedContent folder path in Antimalware.xml, follow the below steps:

Important: Do this on every Exchange Server.

1. Start File Explorer

2. Go to the UnifiedContent folder.

In our example, the location is in the (Q:) drive:

Q:\TransportRoles\data\Temp\UnifiedContent
Exchange UnifiedContent folder keeps growing copy folder path

3. Open the Antimalware.xml settings file

In our example, it’s in the default location:

C:\Program Files\Microsoft\Exchange Server\V15\Bin\Monitoring\Config
antimalware.xml settings file

4. Search for the following path:

C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Temp\UnifiedContent

5. Replace it with the path you copied from step 2.

Q:\TransportRoles\data\Temp\UnifiedContent
Exchange UnifiedContent folder keeps growing edit location

6. Save the file.

Note: You don’t have administrator access if you can’t save the file. Start Notepad as administrator and open the Antimalware.xml settings file so you can adjust the location and save the file.

7. Restart the Exchange Health Manager service.

Restart Microsoft Exchange Health Manager service

Exchange Health Manager will clean the UnifiedContent folder during the next maintenance cycle. By default, maintenance cycles run every 4 hours.

Verify UnifiedContent folder is cleaned

Check the UnifiedContent folder after 4 hours. Verify that the temporary files of the last days are available and all the older files are cleaned up.

Exchange UnifiedContent folder keeps growing copy folder path

That’s it!

Read more: Check Exchange health mailboxes »

Conclusion

You learned why the Exchange UnifiedContent folder keeps growing. The solution is to edit the Antimalware.xml settings file and modify the UnifiedContent folder installation path. After that, Exchange Health Manager will scan the UnifiedContent folder every 4 hours and clean up the temporary files.

Did you enjoy this article? You may also like Mail.que file growing in Exchange Server. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 2 Comments

  1. Hey Ali, thanks for this short and clear article.
    My UnifiedContent folder isn’t in default location too.
    I’ve got one question:
    So far as I know, those .xml-files (are overritten with every cu-update.
    Do I have to change the value in “Antimalware.xml” after ervery update?
    Thanks in advance.
    Benni

Leave a Reply

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