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.
Editor's Note:
The developer warns that some antivirus software may incorrectly flag the download as a virus. This can happen whenever you download a new script; extra steps may be required to whitelist the file. We did not receive any hits through VirusTotal during testing.
It is always a good idea to have a restore point in case you run into an issue.
JetClean is a lightweight, all-in-one utility that can speed up your computer by cleaning your drive, freeing up memory, uninstalling programs, optimizing your startup, etc. Also, is available for download as a portable app.
Advanced SystemCare is a popular and efficient all-in-one computer tweaker that will help clean, optimize, speed up, and protect your computer. Video tutorial available.
Windows Live Essentials allows you to add programs to Windows, including Movie Maker, Photo Gallery, OneDrive, Family Safety, Mail, and Writer. Support ended in January 2017.
Wise Care 365 is a bundle of essential tools, including a registry cleaner, disk cleaner, program uninstaller, memory optimizer, and more. Video tutorial available.
Glary Utilities offers free, powerful, and easy-to-use system tools and utilities to help fix, speed up, maintain, and protect your PC. Video tutorial available. Available as a portable app as well.