Configure remediation for Microsoft Defender Antivirus scans


Welcome to Microsoft Defender for Endpoint, the new name for Microsoft Defender Advanced Threat Protection. Read more about this and other updates here. We'll be updating names in products and in the docs in the near future.

Applies to:

When Microsoft Defender Antivirus runs a scan, it will attempt to remediate or remove threats that it finds. You can configure how Microsoft Defender Antivirus should react to certain threats, whether it should create a restore point before remediating, and when it should remove remediated threats.

This topic describes how to configure these settings with Group Policy, but you can also use Microsoft Endpoint Configuration Manager and Microsoft Intune.

You can also use the Set-MpPreference PowerShell cmdlet or MSFT_MpPreference WMI class to configure these settings.

Configure remediation options

You can configure how remediation works with the Group Policy settings described in this section.

To configure these settings:

  1. On your Group Policy management computer, open the Group Policy Management Console, right-click the Group Policy Object you want to configure and click Edit.

  2. In the Group Policy Management Editor go to Computer configuration and click Administrative templates.

  3. Expand the tree to Windows components > Microsoft Defender Antivirus and then the Location specified in the table below.

  4. Double-click the policy Setting as specified in the table below, and set the option to your desired configuration. Click OK, and repeat for any other settings.

Location Setting Description Default setting (if not configured)
Scan Create a system restore point A system restore point will be created each day before cleaning or scanning is attempted Disabled
Scan Turn on removal of items from scan history folder Specify how many days items should be kept in the scan history 30 days
Root Turn off routine remediation You can specify whether Microsoft Defender Antivirus automatically remediates threats, or if it should ask the endpoint user what to do. Disabled (threats are remediated automatically)
Quarantine Configure removal of items from Quarantine folder Specify how many days items should be kept in quarantine before being removed Never removed
Threats Specify threat alert levels at which default action should not be taken when detected Every threat that is detected by Microsoft Defender Antivirus is assigned a threat level (low, medium, high, or severe). You can use this setting to define how all threats for each of the threat levels should be remediated (quarantined, removed, or ignored) Not applicable
Threats Specify threats upon which default action should not be taken when detected Specify how specific threats (using their threat ID) should be remediated. You can specify whether the specific threat should be quarantined, removed, or ignored Not applicable


Microsoft Defender Antivirus detects and remediates files based on many factors. Sometimes, completing a remediation requires a reboot. Even if the detection is later determined to be a false positive, the reboot must be completed to ensure all additional remediation steps have been completed.

If you are certain Microsoft Defender Antivirus quarantined a file based on a false positive, you can restore the file from quarantine after the device reboots. See Restore quarantined files in Microsoft Defender Antivirus.

To avoid this problem in the future, you can exclude files from the scans. See Configure and validate exclusions for Microsoft Defender Antivirus scans.

Also see Configure remediation-required scheduled full Microsoft Defender Antivirus scans for more remediation-related settings.