These PowerShell scripts generate a list of file, folder, process file extension exclusions for configuring antivirus software that will be running on an Exchange 2013 or Exchange 2016 servers. The correct exclusions are recommended to prevent antivirus software from interfering with the operation of Exchange Server.

The scripts are based on information published by Microsoft:

Use the scripts to generate the exclusion list based on a single server. You can then apply the same exclusions to all servers that have the same configuration. If your antivirus software has a policy-based administration console then that can make the configuration of multiple servers more efficient.

Run the script in the Exchange Management Shell locally on the server you wish to generate the exclusions list for.

Example:

PowerShell
Edit|Remove
[PS] C:\Scripts\av>.\Get-Exchange2013AVExclusions.ps1 
Done.
PowerShell
Edit|Remove
[PS] C:\Scripts\av>.\Get-Exchange2016AVExclusions.ps1 
Done.
For Exchange 2016 on Windows Server 2016, the script can automatically create the Windows Defender exclusions for you:
PowerShell
Edit|Remove
[PS] C:\Scripts\av>.\Get-Exchange2016AVExclusions.ps1 -ConfigureWindowsDefender
The lists of exclusions are output to three text files.

 

More information about these scripts can be found at Exchange Server Pro.

Feedback and questions are welcome there. Please consider raising any bugs as issues on Github.