skip to Main Content

Antivirus exclusions for Exchange Server

It is crucial to have the right Antivirus exclusions for Exchange Server 2013/2016/2019. Antivirus/Security will slow down the Exchange Server. Think about excluding the correct folders, processes, and extensions for Exchange Server. Yes, that is a bunch to exclude, but don’t you want the Exchange Server performing fast? In this article, you will learn which Antivirus exclusions need to be made on the Exchange Server.

Download Antivirus exclusions for Exchange script

Download the appropriate script for Exchange Server 2013/2016/2019. Place the PowerShell script in path C:\scripts on the Exchange Server and not on any other server.

Run Exchange Management Shell as administrator. Change the directory to the scripts folder and then run the script.

[PS] C:\>cd C:\scripts\

[PS] C:\scripts>.\Get-Exchange2016AVExclusions.ps1

You will see the output Done. The script finished.

Antivirus exclusions for Exchange result

Browse to the C:\scripts\ folder, and you will see three generated text output files:

  • Extensions
  • Paths
  • Procs
Antivirus exclusions for Exchange 2013 and 2016 output files

Open the text files to check the exact exclusions that need to be made for the Exchange Server.

Antivirus exclusions for Exchange 2013 and 2016 exclusions

Exclude the extensions, the paths of the directories, and the process that shows in the text file in the Antivirus/Security application.

Exclude Exchange Server exclusions in Windows Defender

Suppose you have Windows Defender as your security product. You can run the script with the -ConfigureWindowsDefender switch, and it will add the exclusions to Windows Defender.

[PS] C:\scripts>.\Get-Exchange2019AVExclusions.ps1 -ConfigureWindowsDefender
Windows Defender PowerShell module available.

The Exchange Server exclusions are successfully added in Windows Defender.

Antivirus exclusions for Exchange Server Windows Defender

Verify Exchange Server exclusions

After adding the exclusions to the Antivirus/Security product, check Exchange Antivirus exclusions are set correctly.


You learned about Antivirus exclusions for Exchange 2013/2016/2019. Remember to add the exclusions in the Antivirus/Security product. Do this after installing the Exchange Server and configuring the mailbox databases. Do you already have an Exchange Server installed in production? Configure the Antivirus exclusions right now.

Did you enjoy this article? You may also like Turn off Windows Defender in Windows 11 permanently. Don’t forget to follow us and share this article.



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 4 Comments

  1. Hello and thank you for this great article 😊

    I have windows server 2012 r2 (still) and exchange standard 2013 in dag mode. I am using eset mail security on db servers. Can I follow the instructions and exclude safely files and dirs? Or this article it’s only for windows.defender?

    Thank you

    1. Welcome, George.

      The Exchange Server antivirus exclusions are for every security product you have running.

      You should add the exclusions to ESET Mail Security for Microsoft Exchange Server.

  2. If you run the script with the -ConfigureWindowsDefender switch, it will automatically configure the exclusions in Windows Defender.

Leave a Reply

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