Score:0

Clear Windows Defender History in in Windows 11 22H2 22621.2215 and later is not possible

cn flag

I want to delete the Windows Defender History in Windows 11 22H2 22621.2215. In particular, accessing the folder C:\ProgramData\Microsoft\Windows Defender\Scans is not possible. It seems that Microsoft has specially secured access to this folder. How to clear Defender history anyway? A PowerShell script would be nice.

All previously published Howtos are not succesfull. eg https://techviral.net/clear-microsoft-defender-protection-history/ is not successfull.

You cannot take ownership of the folder through the Windows Explorer. Using an administrative command line allows you to switch to the Scans folder, but the system also prevents you from deleting the History subfolder.

librhnylmz avatar
cn flag
Did you try this in Safe Mode?
Score:-1
sm flag

Here's a PowerShell script to clear Windows Defender history on Windows 11. This script stops the Windows Defender service, deletes the history folder, and then restarts the service:

Stop Windows Defender service

Stop-Service -Name WinDefend

Specify the path to the Windows Defender history folder

$DefenderHistoryPath = "C:\ProgramData\Microsoft\Windows Defender\Scans\History"

Delete the history folder and its contents

Remove-Item -Path $DefenderHistoryPath -Force -Recurse

Start Windows Defender service

Start-Service -Name WinDefend

Please note that this script requires administrator privileges to run successfully. Also, it's important to emphasize that clearing Windows Defender history should not be done without a valid reason, as it can potentially impact your system's security. Regularly clearing the history is not recommended. Only do this if you suspect a specific issue related to the history data.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.