Configure and validate exclusions for Microsoft Defender Antivirus scans

Applies to:

You can exclude certain files, folders, processes, and process-opened files from Microsoft Defender Antivirus scans. Such exclusions apply to scheduled scans, on-demand scans, and always-on real-time protection and monitoring. Exclusions for process-opened files only apply to real-time protection.

Configure and validate exclusions

To configure and validate exclusions, see the following:

Recommendations for defining exclusions


Microsoft Defender Antivirus includes many automatic exclusions based on known operating system behaviors and typical management files, such as those used in enterprise management, database management, and other enterprise scenarios and situations.

Defining exclusions lowers the protection offered by Microsoft Defender Antivirus. You should always evaluate the risks that are associated with implementing exclusions, and you should only exclude files that you are confident are not malicious.

Keep the following points in mind when you are defining exclusions:

  • Exclusions are technically a protection gap. Always consider mitigations when defining exclusions. Other mitigations could be as simple as making sure the excluded location has the appropriate access-control lists (ACLs), audit policy, is processed by an up-to-date software, etc.

  • Review the exclusions periodically. Recheck and re-enforce the mitigations as part of the review process.

  • Ideally, avoid defining exclusions intending to be proactive. For instance, don't exclude something just because you think it might be a problem in the future. Use exclusions only for specific issues, such as those pertaining to performance or application compatibility that exclusions could mitigate.

  • Audit the exclusion list changes. The security admin should preserve enough context around why a certain exclusion was added. You should be able to provide answer with specific reasoning as to why a certain path was excluded.