清空defender protection history

2023-08-11 12:13:02 浏览数 (1)

protection history有许多记录,非常碍眼,我查询验证了命令如下

代码语言:javascript复制
Stop-Service -Name windefend -Force -ErrorAction SilentlyContinue
Remove-Item -Path "C:ProgramDataMicrosoftWindows DefenderScansHistory*" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "HKLM:SOFTWAREMicrosoftWindows DefenderScanHistory*" -Recurse -Force -ErrorAction SilentlyContinue

如果执行了没效果,可能需要提权后再执行,提权参考我这篇文档:https://cloud.tencent.com/developer/article/2285183

第一行报错忽略,是符合预期的,要第一行不报错参考我这篇文档:https://cloud.tencent.com/developer/article/old/2293494

总之,上面这3行命令我试了是起作用的

0 人点赞