MDE Antivirus Configuration Common Mistakes and Best Practice


_______________________________________________________                                John Barbare and Tan Tran

Dear IT Pros, 

We discuss about Microsoft for Endpoint Antivirus Configuration, Policy and exclusion list in detail to avoid making the common mistakes and to apply the to it.

for AV Policy Settings:

  • You may wonder what is the best Scan types for your daily scheduled scan on all systems,  the Full Scan is for investigation of virus attack on the system, for the weekly or daily scheduled scan,  it should be good and sufficient with quick scan.
  • Make different Endpoint Configuration Manager AV policies for different device types and deploy the related policies to the corresponding collections, SQL Server Collection, IIS Server Collection, Restricted Workstation Collection, Standard Workstation Collection

         Example of AV Policies for different Servers and Workstation types:


  • Antivirus Exclusion recommendation from Microsoft Team:



Common Mistakes:

DisableCpuThrottleOnIdleScans (Feature available on Windows 10 20H2)

This setting indicates whether the CPU will be throttled for scheduled scans while the device is idle.

  • This parameter is enabled by default, thus ensuring that the CPU will not be throttled for scheduled scans performed when the device is idle, regardless of what ScanAvgCPULoadFactor is set to.
  • DisableCpuThrottleOnIdleScans will override the value (5-100% CPU time) set by ScanAvgCPULoadFactor

An Example of CPU throttling controlled by MCM or by MEM:


  • In my Lab, the on-demand fullscan also been impacted by non-throttling status too.

         On the test device Windows 10 version 20H2 with the setting DisableCpuThrottleOnIdleScans      turn on:     

          > Set-MpPreference -DisableCpuThrottleOnIdleScans $False


           > Run on-demand full scan, Start-MpScan -ScanType FullScan


With the setting to allow CPU without Throttling , my computer did have CPU Spike from 11% before now it grows to more than 70%, 80%, 95% in a short period of 1-2 minutes.


We just need to disable in the related Registry Key of Windows Scan or by powershell command in the device.


Registry Key for the setting,

ComputerHKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows DefenderScan:


Antivirus Exclusion mistakes

Antivirus Exclusion could be helpful or harmful if we set Antivirus to skip the threat in files and process. The common misconception could be named a few.

  1. Exclude process which is the frontline interfaced to threat like MS Word, MS Outlook , Java Engine or Acrobat Reader.
  2. Exclude Cabinet, compress file .zip, .tar, .cab, .7ip from AV Scan, they could contain threat source.
  3. User Profile temp folder, System temp folder where the malicious file may locate as its base:
    • C:UsersAppDataLocalTemp
    • C:UsersAppDataLocalLowTemp
    • C:UsersAppDataRoamingTemp
    • %Windir%Prefetch
    • %Windir%System32Spool
    • C:WindowsSystem32CatRoot2
    • %Windir%Temp
  1. Use of environment variables as a wildcard in exclusion lists is limited to system variables, do not use user environment variables when adding Microsoft Defender Antivirus folder and process exclusions.

Grey Area of Exclusion:

Image files: You can chose to exclude file types, such as .gif, .jpg, .jpeg, .png if your environment has a modern, up-to-date software with a strict update policy to handle any vulnerabilities.

Missing MDE (Microsoft Defender for Endpoint) exclusion

  • If you need to apply exclusion for threat detected by Defender for Endpoint Cloud Service, use the related exclusion.
  • Microsoft Defender Antivirus exclusions don't apply to other Microsoft Defender for Endpoint capabilities, including endpoint detection and response (EDR), attack surface reduction (ASR) rules, and controlled folder access.
  • To exclude files broadly, add them to the Microsoft Defender for Endpoint custom indicators.


  •   To exclude files, folders in MDE


Example of Defender for Endpoint – MDE Exclusion from investigation scans:

   > SettingsAutomation folder exclusions

   > New Folder exclusion




        > Add multiple folder exclusions as per our needs:



Default Exclusion on Newer Server Version (2016 and 2019)

Automatic exclusion available on 2016 and 2019 servers

On , 2019, the automatic exclusion helps in prevention of unwanted CPU spike during real-time scanning, it is additional to your custom exclusion list and it is kind of smart scan with exclusion based on server role such as DNS, , host, File Server, Print Server, Web Server, etc.

  • Your Custom exclusions take precedence over automatic exclusions.
  • Automatic exclusions only apply to Real-time protection (RTP) scanning. Automatic exclusions are not honored during a Full/Quick or On-demand scan.
  • Custom and duplicate exclusions do not conflict with automatic exclusions.
  • Microsoft Defender Antivirus uses the Deployment Image Servicing and Management (DISM) tools to determine which roles are installed on your computer and apply the appropriate automatic exclusions.

The Discussion about Antivirus Configuration could not be ended here, it might be our on-going attention and practice. I will continue updating this article based on your feedback.

Until next time.


Common mistakes to avoid when defining exclusions – Windows security | Microsoft Docs

Configure Microsoft Defender Antivirus exclusions on Windows Server 2016 or 2019 – Windows security | Microsoft Docs

Configure and validate exclusions based on extension, name, or location – Windows security | Microsoft Docs

Manage automation folder exclusions – Windows security | Microsoft Docs


This article was originally published by Microsoft's Secure Blog. You can find the original article here.