ClearDefenderHistory

Published by

ClearDefenderHistory clears the Windows Defender "Protection history" by creating a scheduled task, configured to run as SYSTEM, that clears the Windows Defender log folder on your machine's next restart.

ClearDefenderHistory

ClearDefenderHistory clears the Windows Defender "Protection history" by creating a scheduled task, configured to run as SYSTEM, that clears the Windows Defender log folder on your machine's next restart.

Important Note
Clearing the history without a restart was possible in previous versions of this script. However, a change to Windows Defender security in the Spring of 2024 caused the previous method to stop working. As a result, a restart is now required until a more effective method is developed.

Clear Historical Detections
Some users might find it beneficial to run the script to clear out historical detections in their Protection history, effectively decluttering the records. In other cases, the script resolves a persistent issue where Windows Defender continues to flag a false positive even after updated virus definitions have been installed to address the detection. This script aims to provide a practical solution for those encountering this specific issue.

Usage
To use ClearDefenderHistory, download the zip file, extract ClearDefenderHistory.cmd, right-click ClearDefenderHistory.cmd, select Properties, check Unblock, and click OK. Then, double-click ClearDefenderHistory.cmd to run it. Unless you run it from an elevated console, you will get a UAC prompt. If you didn't unblock it in properties, click Run when you get the security warning.

Similar:
How to Stop Windows 10 & 11 From Sending Files to Microsoft
What's the Best Antivirus and Is Windows Defender Good Enough
4 Ways to Turn On or Off Windows Defender Real-time Protection
Windows Device Performance & Health Explained

ClearDefenderHistory