The Protection history page in the Windows Security app is where you can go to view actions that Microsoft Defender Antivirus has taken that include, including Potentially Unwanted Apps that have been removed, or key services that are turned off. By default, Protection history only retains events for two weeks, after which they’ll disappear from this page. You can change how long to keep or retain items in the scan history folder, after which, Microsoft Defender removes expired events. If you specify the value zero ( 0 ), events are never automatically removed by retaining indefinitely. Below is how to change how long Protection history events are kept in the Windows Security app when using Windows 11
How to change Windows Security Protection history events removal in Windows 11
As mentioned above, Protection history only retains events for two weeks, after which they’ll disappear from this page.
However, you can change how long to keep or retain Protection history events or choose not to automatically remove them.
Below is how to do that:
Using PowerShell, open as administrator, then run the commands below to view the current purge settings for Protection history in Windows Security.
By default, it’s set to 15.
To change how long Protection history events are retained, run the format of the command below:
Replace
15 days = Default. 0 days = Protection history events will not automatically be removed.
The screenshot below shows a command to retain the Protection history events for 100 days. That should do it! Conclusion: This post showed you how to change how long Windows Security Protection history events are retained in Windows 11. If you find any error above or have something to add, please use the comment form below.