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.