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?
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.
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
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.
2. Delete via the File Explorer.
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:
- Delete all the contents of the folder by pressing Ctrl + A and then Shift + Del.
3. Set a different value for the log folder
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.
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:
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.