Skip to content

Commit b50e0fd

Browse files
authored
Merge pull request #3083 from MicrosoftDocs/main
pushing troubleshooting article live
2 parents df38777 + f60882c commit b50e0fd

File tree

4 files changed

+224
-0
lines changed

4 files changed

+224
-0
lines changed

defender-endpoint/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,8 @@
414414
href: mde-sec-ops-guide.md
415415
- name: Troubleshoot
416416
items:
417+
- name: Troubleshoot antivirus scan issues
418+
href: troubleshoot-mdav-scan-issues.md
417419
- name: Troubleshoot onboarding issues
418420
items:
419421
- name: Troubleshoot issues during onboarding
94.7 KB
Loading
134 KB
Loading
Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
---
2+
title: Troubleshoot Microsoft Defender Antivirus scan issues
3+
description: Troubleshoot antivirus scan issues, such as scan not finishing or scans affecting device performance.
4+
ms.service: defender-endpoint
5+
ms.author: deniseb
6+
author: denisebmsft
7+
ms.localizationpriority: medium
8+
manager: deniseb
9+
audience: ITPro
10+
ms.collection:
11+
- m365-security
12+
- tier3
13+
ms.topic: troubleshooting
14+
ms.subservice: ngp
15+
search.appverid: met150
16+
ms.date: 03/06/2025
17+
---
18+
19+
# Troubleshoot Microsoft Defender Antivirus scan issues
20+
21+
If you're seeing issues with Microsoft Defender Antivirus scans, such as scans aren't finishing, or scans are causing performance issues on devices, you might need to troubleshoot the scan process. This article describes how to identify information to address issues with Microsoft Defender Antivirus scans. You learn how scans are launched, what policies are applied to scans, why scans ended, and what's impacting the performance of a scan.
22+
23+
> [!NOTE]
24+
> To understand differences between antivirus scan types, see [Comparing the quick scan, full scan, and custom scan](schedule-antivirus-scans.md#comparing-the-quick-scan-full-scan-and-custom-scan).
25+
26+
## How scans are launched
27+
28+
Understanding why a scan is launched can help identify what settings are applied to the scan and what can be adjusted. In Microsoft Defender for Endpoint, antivirus scans can be launched in several ways. The following table summarizes these options:
29+
30+
| Method | Description |
31+
|--|--|
32+
| Schedule | Defined by policy as per policy table |
33+
| Scan after update | Defined by policy (Settings catalog in Intune) |
34+
| Catch up scan | Launched when a scheduled scan was missed twice |
35+
| Manually launched | A scan is launched manually by using any of the following methods: <br/>- Command Prompt: `MpCmdRun -scan -scantype` <br/>- [Taking a response action on a device](/defender-endpoint/respond-machine-alerts#run-microsoft-defender-antivirus-scan-on-devices) in the Microsoft Defender portal <br/>- Using the Windows Security app or Microsoft Defender app on the device |
36+
37+
## Policies that impact scanning
38+
39+
Understanding the policies applied to the scan enables you to understand the behavior of the scan and what can be tuned to remediate scan challenges.
40+
41+
The following table summarizes antivirus settings in Microsoft Intune for Windows devices:
42+
43+
| Group | Setting | Description |
44+
|--|--|--|
45+
| Scan | Allow Full Scan On Mapped Network Drives | This policy setting allows you to configure scanning mapped network drives. Keep in mind that configuring this setting can degrade performance on full scans. |
46+
| Scan | Allow Full Scan Removable Drive Scanning | This policy setting allows you to manage whether or not to scan for malicious software and unwanted software in the contents of removable drives, such as USB flash drives, when running a full scan. |
47+
| Scan | Allow Scanning Network Files | This policy setting allows you to configure scheduled scans and on-demand (manually initiated) scans for files that are accessed over the network. It's recommended to enable this setting. |
48+
| Scan | Avg CPU Load Factor | This policy setting allows you to configure the maximum percentage CPU utilization permitted during a scan. Valid values for this setting are a percentage represented by the integers 5 to 100. A value of 0 indicates that there should be no throttling of CPU utilization. The default value is 50. |
49+
| Scan | Allow Archive Scanning | This policy setting allows you to configure scans for malicious software and unwanted software in archive files such as .ZIP or .CAB files. Keep in mind that configuring this setting can degrade performance on a scan. |
50+
| Scan | Archive Max Depth | |
51+
| Scan | Archive Max Size | |
52+
| Scan | Check For Signatures Before Running Scan | This policy setting allows you to manage whether a check for new virus and spyware security intelligence occurs before running a scan. It applies to scheduled scans, but has no effect on scans initiated manually from the user interface or scans started using Command Prompt with the command, `mpcmdrun -Scan`. |
53+
| Scan | Disable Catchup Full Scan | This policy setting allows you to configure catch-up scans for scheduled full scans. A catch-up scan is a scan that's initiated because a regularly scheduled scan was missed. Usually, these scheduled scans are missed because the computer was turned off at the scheduled time. <br/><br/>If you disable or don't configure this setting, catch-up scans for scheduled full scans occur. If a computer is offline for two consecutive scheduled scans, a catch-up scan is started the next time someone signs into the computer. If there's no scheduled scan configured, no catch-up scan runs. <br/><br/> If you enable this setting, catch-up scans for scheduled full scans are disabled. |
54+
| Scan | Enable Low CPU Priority | This policy setting allows you to enable or disable low CPU priority for scheduled scans. <br/>- If you enable this setting, low CPU priority is used during scheduled scans. <br/>- If you disable or don't configure this setting, no changes are made to CPU priority for scheduled scans. |
55+
| General | Excluded Extensions | |
56+
| General | Excluded Paths | |
57+
| General | Excluded Processes | |
58+
| Scan Schedule | Scan Parameter | This policy setting allows you to specify the scan type to use during a scheduled scan. Scan type options are: <br/>- `1` = Quick Scan (default) <br/>- `2` = Full Scan <br/><br/>If you enable this setting, the scan type is set to the specified value. <br/><br/>If you disable or don't configure this setting, the default scan type is used. |
59+
| Scan Schedule | Schedule Quick Scan Time | This policy setting allows you to specify the time of day at which to perform a daily quick scan. The time value is represented as the number of minutes past midnight (`00:00`). For example, `120 (0x78)` is equivalent to 02:00 AM. By default, this setting is set to disabled. The schedule is based on local time on the computer where the scan is executing. <br/><br/>If you enable this setting, a daily quick scan runs at the time of day specified. <br/><br/>If you disable or don't configure this setting, daily quick scan controlled by this configuration doesn't run. |
60+
| Scan Schedule | Schedule Scan Day | This policy setting allows you to specify the day of the week on which to perform a scheduled scan. The scan can also be configured to run every day or to never run at all. <br/><br/>This setting can be configured with the following ordinal number values: <br/>- (`0x0`) Every Day <br/>- (`0x1`) Sunday <br/>- (`0x2`) Monday <br/>- (`0x3`) Tuesday <br/>- (`0x4`) Wednesday <br/>- (`0x5`) Thursday <br/>- (`0x6`) Friday <br/>- (`0x7`) Saturday <br/>- (`0x8`) <br/>- Never (*default*) <br/><br/>If you enable this setting, a scheduled scan runs at the frequency specified. <br/><br/>If you disable or don't configure this setting, a scheduled scan runs at a default frequency. |
61+
| Scan Schedule | Schedule Scan Time | This policy setting allows you to specify the time of day at which to perform a scheduled scan. The time value is represented as the number of minutes past midnight (00:00). For example, 120 (0x78) is equivalent to 02:00 AM. By default, this setting is set to a time value of 2:00 AM. The schedule is based on local time on the computer where the scan is executing. <br/><br/>If you enable this setting, a scheduled scan runs at the time of day specified. <br/><br/>If you disable or don't configure this setting, a scheduled scan runs at a default time. |
62+
| Scan Schedule | Randomize Schedule Task Times | Widen or narrow the randomization period for scheduled scans. Specify a randomization window of between 1 and 23 hours by using the setting `SchedulerRandomizationTime`. |
63+
| Scan Schedule | Scheduler Randomization Time | |
64+
| Scan Schedule | Turn on scan after Security intelligence update | Turn on scan after Security intelligence update. Keep in mind that this setting is only available through Settings Catalog. |
65+
66+
In an Intune policy and in [Defender for Endpoint Security Settings Management](/defender-endpoint/mde-security-settings-management), you can configure two scanning schedules:
67+
68+
- **A daily quick scan**: You can configure the time a daily quick scan runs. Disabling or not configuring disables a daily quick scan.
69+
70+
Setting: `Schedule Quick Scan Time`
71+
72+
- **A Scheduled scan**: You can configure when a scheduled scan runs, you can choose the type of scan and when it runs.
73+
74+
Settings: `Scan Parameter`; `Schedule Scan Day`; and `Schedule Scan Time`
75+
76+
If you are using Group Policy to manage your devices, see [Configure Microsoft Defender Antivirus with Group Policy](/defender-endpoint/use-group-policy-microsoft-defender-antivirus#group-policy-settings-and-resources)
77+
78+
For information about troubleshooting antivirus settings, see [Troubleshoot Microsoft Defender Antivirus settings](/defender-endpoint/troubleshoot-settings)
79+
80+
For more information about scan behaviors when Microsoft Defender Antivirus is in passive mode, see [Microsoft Defender Antivirus compatibility with other security products](/defender-endpoint/microsoft-defender-antivirus-compatibility#notes-about-protection-states)
81+
82+
## Frequently asked questions about scans
83+
84+
- **Question**: My quick scans are scheduled for Mondays but they're happening daily. Why is that?
85+
86+
**Answer**: If you want the scheduled scans to be the only scans, set `ScheduleQuickScanTime` to `0`.
87+
88+
- **Question**: Why are catch-up scans not running on my machine, even though `DisableCatchupQuickScan` is set to `0`?
89+
90+
**Answer**: Catch-up scans don't run when the device is running on battery.
91+
92+
- **Question**: Why are daily quick scans not running on my machine even though I have scheduled them?
93+
94+
**Answer**: Check to see if daily quick scans are configured on the machine. If `ScanParameters` is set to `2`, then the default scheduled scan type is `Full Scan`. If `ScheduledQuickScanTime` is set to `0`, then daily quick scans aren't set.
95+
96+
- **Question**: Why is my full scan failing due to memory issues (memory consumption/exceeding constraints)?
97+
98+
**Answer**: It's possible that there are a large number of cab/zip files on the machine. We recommend going through high size folders and either cleaning up or removing unused files, and/or implementing exclusions for specific cases (such as files under `C:\Windows`). See [Recommended antivirus exclusions for Configuration Manager](/troubleshoot/mem/configmgr/endpoint-protection/recommended-antivirus-exclusions).
99+
100+
## How to confirm scan status
101+
102+
Confirming if a scan has been canceled or finished successfully allows you to target devices that have failed scans. To find out what happened, you can use Event Viewer in Windows; reports, advanced hunting, and the Device page in the Microsoft Defender portal; or APIs.
103+
104+
### Event Viewer
105+
106+
The following Event IDs are related to scan operations on a device.
107+
108+
- Event ID `1000` - An anti-malware scan started.
109+
- Event ID `1001` - An anti-malware scan finished.
110+
- Event ID `1002` - An anti-malware scan was stopped before it finished.
111+
112+
For more information, see [Microsoft Defender Antivirus event IDs and error codes](/defender-endpoint/troubleshoot-microsoft-defender-antivirus).
113+
114+
Event viewer can be access on the machine by the application or PowerShell. For more information, see [Review logs in Event Viewer](#review-logs-in-event-viewer) (in this article).
115+
116+
### Reports in the Microsoft Defender portal
117+
118+
Reports are available that include current scan status. You can expand the view and export details. For more information, see [Device health report](/defender-endpoint/device-health-microsoft-defender-antivirus-health).
119+
120+
### Advanced hunting
121+
122+
You can also find information about scan completion and cancellation in [advanced hunting](/defender-xdr/advanced-hunting-overview). To get help with advanced hunting, see the following articles:
123+
124+
- [Proactively hunt for threats with advanced hunting in Microsoft Defender](/defender-xdr/advanced-hunting-overview)
125+
- [Choose between guided and advanced modes to hunt in Microsoft Defender XDR](/defender-xdr/advanced-hunting-modes)
126+
- [Learn the advanced hunting query language](/defender-xdr/advanced-hunting-query-language)
127+
128+
### Device page in the Microsoft Defender portal
129+
130+
In the Microsoft Defender portal, you can view information about scans on the device page. For more information, see the following articles:
131+
132+
- [Device health reports in Microsoft Defender for Endpoint](device-health-reports.md)
133+
- [Device inventory](machines-view-overview.md)
134+
135+
### APIs
136+
137+
Data about scan status can be exported by using the export health reporting API, as follows:
138+
139+
```console
140+
141+
"quickScanResult": "Completed",
142+
"quickScanError": "",
143+
"quickScanTime": "2202-08-02T18:40:15.882Z",
144+
"fullScanResult": "",
145+
"fullScanError": "",
146+
"fullScanTime": null,
147+
148+
```
149+
150+
For more information, see [Export device antivirus health report](/defender-endpoint/api/device-health-export-antivirus-health-report-api).
151+
152+
## Reasons why scans are canceled or terminated
153+
154+
Identifying why a scan was canceled enables you to identify what needs to be reviewed to enable scans to finish successfully. The following table lists reasons why scans didn't complete.
155+
156+
| Reason | Details |
157+
|--|--|
158+
| The device restarts | Details of device restarts can be reviewed using Event Viewer on the device. <br/>- Event Log: System <br/>- Event IDs: `6005`, `6006`, `6007`, and `6008` |
159+
| The scan times out | Scheduled scans use `mpcmdrun`, but if someone uses `mpcmdrun` to run an on-demand scan, the timer still applies. Antivirus scans launched by the Windows Security app (Local) and the Microsoft Defender portal don't use `mpcmdrun`, and each method starts a scan directly by using `mpclient`. <br/>- Scans initiated in the Microsoft Defender portal or the Windows Security app (Quick or Full): No time limit<br/>- Scheduled Full Scans or `MpCmdRun -scan`: Seven day limit<br/>- Scheduled Quick Scans or `MpCmdRun -scan`: One day limit |
160+
| The device is running on battery | If a device is unplugged and running on battery during a scheduled full scan, the scheduled scan stops with event `1002`, which states that the scan stopped before completion. Microsoft Defender Antivirus runs a full scan at the next scheduled time. For more information, see [Schedule antivirus scans: Important points to keep in mind](/microsoft-365/security/defender-endpoint/schedule-antivirus-scans?#important-points-to-keep-in-mind).
161+
| Other power-related events | The following event IDs (from Kernel-Power) indicate changing of the power state of the device which could impact the scanning finishing in a timely manner: <br/>- `107`: The system has resumed from sleep.<br/>- `42`: The system is entering sleep. Sleep Reason: Hibernate from Sleep - Standby Battery Budget Exceeded<br/>- `507`: The system is exiting Modern Standby. Reason: Sleep, Hibernate, or Shutdown.<br/>- `506`: The system is entering Modern Standby. Reason: Lid.<br/>- `105`: Power source change. |
162+
163+
## Use performance analyzer on the device
164+
165+
If, after following the guidance in this article, you haven't identified a misconfiguration issue on the device, you can use the `New-MpPerformanceRecording` command to generate a trace to identify problems on the device. This performance analyzer gives you the following information:
166+
167+
- Top paths that impact scan time
168+
- Top files that impact scan time
169+
- Top processes that impact scan time
170+
- Top file extensions that impact scan time
171+
- Combinations, like these:
172+
- Top files per extension
173+
- Top paths per extension
174+
- Top processes per path
175+
- Top scans per file
176+
- Top scans per file per process
177+
178+
For more information, see [Performance analyzer for Microsoft Defender Antivirus](/defender-endpoint/tune-performance-defender-antivirus).
179+
180+
One outcome of this process might be identifying files or paths that you want to exclude from antivirus scans to improve performance. Make sure to review the following articles:
181+
182+
- [Exclusions overview](/defender-endpoint/navigate-defender-endpoint-antivirus-exclusions)
183+
- [Contextual file and folder exclusions](/defender-endpoint/configure-contextual-file-folder-exclusions-microsoft-defender-antivirus)
184+
185+
## Reviewing Event logs
186+
187+
Local event logs can be reviewed either using the Event Viewer application or by using PowerShell.
188+
189+
### Review logs in Event Viewer
190+
191+
On Windows devices, Microsoft Defender Antivirus logs are located at **Application and Service Logs** > **Microsoft** > **Windows** > **Windows Defender** > **Operational**.
192+
193+
The following screenshot shows scan logs in Event Viewer:
194+
195+
:::image type="content" source="media/mdav-scan-logs-event-viewer.png" alt-text="Screenshot showing antivirus scan logs in Windows Event Viewer." lightbox="media/mdav-scan-logs-event-viewer.png":::
196+
197+
Here's an example of Event 1000 in Event Viewer:
198+
199+
:::image type="content" source="media/event-viewer-event1000.png" alt-text="Screenshot showing Event 1000 in Event Viewer on a Windows device." lightbox="media/event-viewer-event1000.png":::
200+
201+
### Review events using PowerShell
202+
203+
You can also access this information with PowerShell by using the [Get-WinEvent](/powershell/module/microsoft.powershell.diagnostics/get-winevent?view=powershell-7.4&preserve-view=true) cmdlet.
204+
205+
For example, to get all events, use this command:
206+
207+
```powershell
208+
Get-WinEvent -LogName 'Microsoft-Windows-Windows Defender/Operational'
209+
```
210+
211+
To view scan events, use this command:
212+
213+
```powershell
214+
Get-WinEvent -LogName 'Microsoft-Windows-Windows Defender/Operational' | where id -eq '1000'
215+
```
216+
217+
## See also
218+
219+
- [Configure scheduled quick or full Microsoft Defender Antivirus scans](schedule-antivirus-scans.md)
220+
- [Exclusions overview](navigate-defender-endpoint-antivirus-exclusions.md)
221+
222+

0 commit comments

Comments
 (0)