How to fix "Can't delete Microsoft Defender Protection history" in Windows?

Question

Issue: How to fix "Can't delete Microsoft Defender Protection history" in Windows?

Hello, I am unable to delete Microsoft Defender history when trying to do that through the “Clean Windows Defender scan history” option. How do I fix this?

Solved Answer

Microsoft Defender is a reliable anti-malware software that comes pre-installed with every Windows operating system. Designed to protect users from various online threats, it constantly scans the system for potential malware, viruses, and other security risks, ensuring that users can operate their computers in a safe environment.

A crucial feature of Microsoft Defender is its Protection History. Whenever the Defender detects a suspicious file or application, it logs this detection and takes necessary action, either blocking or quarantining the threat. This log is what constitutes the Protection History – a record of all flagged items to keep users informed about what actions have been taken to safeguard their system.

Sometimes, however, a legitimate file or application might be mistaken as a threat due to certain characteristics it shares with known malware – this is often referred to as a “false positive.” In such cases, to continue with the installation or use of the flagged software, a user would need to delete the relevant entry from the Protection History.

While this sounds straightforward, some users have reported they can't delete Protection History in Microsoft Defender. This issue can be particularly frustrating if the Defender has flagged a trusted application as suspicious. Often, the inability to delete Protection History is attributed to a minor bug wherein a script does not function as intended.

How to fix "Can't delete Microsoft Defender Protection history" in Windows?

If you find yourself facing this issue, there are alternative methods to delete the Detection History. Detailed instructions for these methods are available below, so please follow them carefully.

While Microsoft Defender is a robust and efficient tool for safeguarding your computer, occasional glitches like the inability to delete Protection History can arise. For an all-encompassing solution to address such Windows-related issues and bugs, consider using a potent PC repair tool FortectMac Washing Machine X9.

1. Delete the Protection History via elevated Command Prompt

Fix it now! Fix it now!
To repair damaged system, you have to purchase the licensed version of Fortect Mac Washing Machine X9.

When a script that's responsible for the removal of Protection History fails, it can be addressed by performing the action manually instead – this can be done via an elevated Command Prompt. Follow these steps:

  • Type cmd in Windows search.
  • Right-click on Command Prompt and select Run as administrator.
  • User Account Control will ask whether you want to allow changes – click Yes.
  • In the new window, copy and paste the following command, pressing Enter after:
    del “%ProgramData%\Microsoft\Windows Defender\Scans\History” /s /f /q
  • Close down Command Prompt and restart your PC.

Delete via Command Prompt

2. Delete via the File Explorer.

Fix it now! Fix it now!
To repair damaged system, you have to purchase the licensed version of Fortect Mac Washing Machine X9.

An alternative way to delete the Protection History is by accessing it via the File Explorer. Here's how:

  • Press Win + E on your keyboard to open File Explorer.
  • At the top, go to the View tab and mark the Show hidden items checkbox.
  • Go to the following location:
    C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service
  • Delete all the contents of the folder by pressing Ctrl + A and then Shift + Del.

Delete manually

3. Set a different value for the log folder

Fix it now! Fix it now!
To repair damaged system, you have to purchase the licensed version of Fortect Mac Washing Machine X9.

You can set the duration for which items remain in the scan log folder. Once this time elapses, Windows Defender automatically removes these items. If you set the value to null, Windows Defender will retain the items indefinitely. If you don't specify a value, Windows Defender will delete items from the default scan log folder after 30 days.

To customize the retention period (in days), you can use the following command in an elevated PowerShell prompt:

  • Type PowerShell in Windows search.
  • Right-click on the result and select Run as administrator.
  • When UAC shows up, click Yes.
  • In the new window, copy and paste the following command (the last number represents the number of days – if you want to set it to the shortest period, simply use 1):
    Set-MpPreference -ScanPurgeItemsAfterDelay 1
  • Press Enter to execute the command.
  • Close down everything and reboot your PC.

Set different value

Repair your Errors automatically

ugetfix.com team is trying to do its best to help users find the best solutions for eliminating their errors. If you don't want to struggle with manual repair techniques, please use the automatic software. All recommended products have been tested and approved by our professionals. Tools that you can use to fix your error are listed bellow:

Offer
do it now!
Download Fix
  Happiness
Guarantee
do it now!
Download Fix
  Happiness
Guarantee
Compatible with Microsoft Windows Compatible with OS X
Still having problems?
If you failed to fix your error using FortectMac Washing Machine X9, reach our support team for help. Please, let us know all details that you think we should know about your problem.
Fortect - a patented specialized Windows repair program. It will diagnose your damaged PC. It will scan all System Files, DLLs and Registry Keys that have been damaged by security threats.Mac Washing Machine X9 - a patented specialized Mac OS X repair program. It will diagnose your damaged computer. It will scan all System Files and Registry Keys that have been damaged by security threats.
This patented repair process uses a database of 25 million components that can replace any damaged or missing file on user's computer.
To repair damaged system, you have to purchase the licensed version of Fortect malware removal tool.To repair damaged system, you have to purchase the licensed version of Mac Washing Machine X9 malware removal tool.

Protect your online privacy with a VPN client

A VPN is crucial when it comes to user privacy. Online trackers such as cookies can not only be used by social media platforms and other websites but also your Internet Service Provider and the government. Even if you apply the most secure settings via your web browser, you can still be tracked via apps that are connected to the internet. Besides, privacy-focused browsers like Tor is are not an optimal choice due to diminished connection speeds. The best solution for your ultimate privacy is Private Internet Access – be anonymous and secure online.

 

Data recovery tools can prevent permanent file loss

Data recovery software is one of the options that could help you recover your files. Once you delete a file, it does not vanish into thin air – it remains on your system as long as no new data is written on top of it. Data Recovery Pro is recovery software that searchers for working copies of deleted files within your hard drive. By using the tool, you can prevent loss of valuable documents, school work, personal pictures, and other crucial files.

About the author
Gabriel E. Hall
Gabriel E. Hall - Passionate computer expert

Gabriel E. Hall is an expert troubleshooter who has been working in the information technology industry for years.

Contact Gabriel E. Hall
About the company Esolutions

What you can add more about the problem: "How to fix "Can't delete Microsoft Defender Protection history" in Windows?"