Forum Discussion
hibi6x
Feb 19, 2024Copper Contributor
MDE migration from 3rd party AV run MDE full scan once migrated
Hi, I am running the project when we are migrating from 3rd party EDR/AV solution. I want to follow recommendation from MS to run at least 1 full scan after 3rd party AV will be uninstalled and MDE...
AdelAlDabbas
Microsoft
Feb 24, 2024Hello hibi6x ,
There is no policy to run only one full scan when defender is switched to active mode.
Assuming your devices are onboarded even while in Passive mode, there is a workaround to achieve your goal using MDE custom detection rules. Here is how:
- Go to Advanced hunting and run a query to list devices where defender was switched to active mode:
DeviceRegistryEvents| where ActionType == "RegistryValueSet"| where InitiatingProcessFileName == "msmpeng.exe"| where RegistryKey contains "Windows Defender"| where RegistryValueName == "PassiveMode"| where RegistryValueData == "0"| where PreviousRegistryValueData == "1"| project DeviceId,DeviceName,Timestamp,ReportId
- Click on "Create detection rule"
- Set your own Detection name, Alert title and Description.
- Set the Severity to "Info".
- Make sure that Frequency is set to Continuous (NRT) and click Next.
- Set impacted entities to Device > DeviceId and click Next.
- In Actions, expand Devices and choose "Run antivirus scan". Then click Next.
- In Scope, I suggest testing this on specific device group(s) before changing it to "All devices".
- Review the Summary and Submit.
Expected result: On Windows devices, a full scan will be triggered within few minutes after Defender is switched to Active mode. The full scan should be triggered once.
Note: An alert will be generated whenever this is triggered. You can view the alerts/actions triggered when you open the detection rule page.
For more information regarding Custom Detection rules: Create and manage custom detection rules in Microsoft Defender XDR | Microsoft Learn