The Protection History page shows detections by Windows Defender and provides detailed and easier-to-understand information about threats and available actions. It now includes Controlled Folder Access blocks, along with any blocks that were made through the organizational configuration of Attack Surface Reduction Rules. In this post, we will show you how to manually clear protection history in Windows Defender on Windows 11/10.
If you use the Windows Defender Offline scanning tool, any detections it makes will now also show in this history. Additionally, you will see any pending recommendations (red or yellow states from throughout the app) in the history list.
How to clear Windows Defender Protection History in Windows 11/10
This specifies the number of days for which items are stored in the scan log folder. After this time, Windows Defender deletes the items. If you specify a null value, Windows Defender will not remove items. If you do not specify a value, Windows Defender will remove items from the default scan log folder, that is, 30 days.
However, if you want to clear the protection history manually, you can do so in any of the three following ways;
- Using Set-MpPreference PowerShell cmdlet
- Delete Windows Defender Service folder from the local drive
- Using Event Viewer
Let’s take a look at the steps involved in relation to each of the listed methods.
1] Using Set-MpPreference PowerShell cmdlet
The Set-MpPreference cmdlet configures preferences for Windows Defender scans and updates. You can modify exclusion file name extensions, paths, or processes, and specify the default action for high, moderate, and low threat levels.
You can specify a different delay period (in days) by running the cmdlet below in PowerShell admin mode (press Win+X and then tap A on the keyboard):
Set-MpPreference -ScanPurgeItemsAfterDelay 1
The specified number 1 is the number of days after which the protection history log and items in the log folder will be cleared.
2] Delete Windows Defender Service folder from the local drive
To manually clear the protection history, this method requires you to delete the Service folder under the Windows Defender folder on the local drive.
Here’s how:
- Press Windows key + R to invoke the Run dialog.
- In the Run dialog, copy and paste the path below and hit Enter (if prompted, click Continue).
C:\ProgramData\Microsoft\Windows Defender\Scans\History
- Now, right-click the Service folder in that location and select Delete.
You can exit File Explorer.
- Next, open Windows Security > Virus & threat protection > Manage settings.
- Toggle the button to Off then to On again for Real-Time protection and Cloud-delivered protection.
3] Using Event Viewer
To manually clear the Windows Defender protection history using the Event Viewer (eventvwr), do the following:
- Press Windows key + R to invoke the Run dialog.
- In the Run dialog, type eventvwr and hit Enter to open Event Viewer.
- Under the Event Viewer (Local) section on the left-hand side of the pane, expand the Applications and Services logs option.
- Under this, expand the Microsoft option.
- Click on Windows to open the list of all its files on the middle pane.
- On the middle pane, scroll down to find Windows Defender from the list of files.
- Right-click Windows Defender, and click on Open.
- From the two options in the middle pane, right-click on Operational, and click Open to view all the past logs.
- Now, under Windows Defender folder on the left pane, right-click on Operational.
- Click on Clear Log… on the menu.
- Select Clear or Save and Clear based on your requirement to clear the protection history.
The above listed are the three ways to clear Windows Defender protection history in Windows manually.
Can’t delete Microsoft Defender Protection history
If you can’t delete Microsoft Defender Protection history using any one of the mentioned methods, open an elevated command prompt, copy-paste the following command – del “%ProgramData%\Microsoft\Windows Defender\Scans\History” /s /f /q
– and hit Enter.
Where can I find Windows Defender history?
To view your Windows Defender Protection History, open Windows Security, and select the Protection History icon on its Home tab. There you will see the Windows Defender history.
Related: You can also change the Time to Clear Windows Security Protection History.
Why is Windows Defender Protection History empty?
If Windows Defender Protection History is not showing, empty, or missing, you need to reset Windows Security. Open Windows Settings > Installed apps > Apps and locate Windows Security. Select Advanced options and click on the Reset button.
Read: How to view Advanced Threat Protection (ATP) Reports in Windows
How to delete Windows Defender’s MPCache Files in Windows 11?
In the C:\ProgramData\Microsoft\Windows Defender\Scans folder, you may see some MPCache files. These are Windows Defender cache files and you can delete them manually from this folder location or use Disk Cleanup Tool to delete them.