I believe it will repopulate whatever you delete.@Andy Ful Can I safely delete the logs in CD's Defender Security Log?
Yes and No.@Andy Ful Can I safely delete the logs in CD's Defender Security Log?
I tried all the steps mentioned on Page 68 to clear Protection History on my fully updated Win 11 system, but nothing seems to work. You can't remove the mpenginedb.db file or clear the Protection History even if you delete the Service folder in Safe Mode. All the detections are still showing up. When I tried the quoted steps, I received an Error: 1058. However, PowerShell works fine when I start it manually. There is no third-party security software, optimizer, or scripts used on my system.Post updated.
If one wants to clear the Defender History or solve the problem with crashing Defender History there is a simple solution.
After running AdvancedRun it will automatically apply the settings and command lines from the AdvancedRun.cfg and the Defender History will be cleared.
- Download the AdvancedRun:
for Windows 32-bit: https://www.nirsoft.net/utils/advancedrun.zip
for Windows 64-bit: https://www.nirsoft.net/utils/advancedrun-x64.zip- Run AdvancedRun.exe once and close it - the file AdvancedRun.cfg will be created
- Edit the config file AdvancedRun.cfg as it is shown below
- Disable Defender Tamper protection >> Run AdvancedRun.exe to clear the Defender History >> Enable Tamper Protection.
The modified content of AdvancedRun.cfg is as follows:
Code:... EXEFilename=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe CommandLine=net stop windefend; $path = 'c:\ProgramData\Microsoft\Windows Defender\Scans\mpenginedb.db'; if (Test-Path -Path $path) {Remove-Item $path}; $path = 'c:\ProgramData\Microsoft\Windows Defender\Scans\History\Service\DetectionHistory'; if (Test-Path -Path $path) {Remove-Item $path -Recurse}; net start windefend AutoRun=1 ... RunAs=8 ...
The PowerShell is executed with CommandLine.
AutoRun=1 means that AdvancedRun does not show the application window and automatically applies the AdvancedRun.cfg
RunAs=8 means that the process will be run with TrustedInstaller privileges.
The CommandLine simply stops Windefend service, checks if the file/folder exists and deletes it, starts Windefend service again.
I tried all the steps mentioned on Page 68 to clear Protection History on my fully updated Win 11 system, but nothing seems to work.
Check VS logs for a possible answer. Either that or possibly because you disabled scanning in TS.Event[0]:
Time Created : 2023-11-20 7:30:21 AM
ProviderName : Microsoft-Windows-Windows Defender
Id : 5001
Message : Microsoft Defender Antivirus Real-time Protection scanning for malware and other potentially unwanted software was disabled.
Andy, just wondering why I would get this event everyday when starting computer?
Additional Info: Running CD on High setting, alongside Cyberlock, I have also stopped the scheduled Defender scans in Task Scheduler.
Thanks.
Did you check VS developer.log.log in program data?View attachment 279810
This Cyberlock log item occurs at the same time as the Defender event. It may be possible they both occurred at the same time as that's the time I powered on my computer. I'm thinking event is because I did cancel scanning.
There are about 20 command lines shown and all of them are "Allowed" if that means anything.Command Line log (in CL) is also clear with no related block?
I can't remember I ever had a scan blocked in CD or HC. Even on HC max with nearly all stuff actived in SRP.
Had a look but I have no idea what these logs mean. But thanks for the idea. Unless Andy knows what's going on I'll have to try to figure it out by uninstalling Cyberlock and/or allowing Defender scanning again.Did you check VS developer.log.log in program data?
I can sometimes see such alerts. I think that they are related to the Defender updates. If so then this event should be followed by another event about enabling Real-time protection. But, I am not sure why you have this event every day when starting the computer.Event[0]:
Time Created : 2023-11-20 7:30:21 AM
ProviderName : Microsoft-Windows-Windows Defender
Id : 5001
Message : Microsoft Defender Antivirus Real-time Protection scanning for malware and other potentially unwanted software was disabled.
Andy, just wondering why I would get this event everyday when starting computer?
Additional Info: Running CD on High setting, alongside Cyberlock, I have also stopped the scheduled Defender scans in Task Scheduler.
Thanks.