Error Details
| Fact | Value | Source | Note |
|---|---|---|---|
| Exact error string | The service cannot be started (0x80070422) | Event Viewer > Windows Logs > System - Event ID 7000/7023 | -> WinDefend |
| Affected build range | Windows 10, Windows 11 | Microsoft Defender for Endpoint documentation | |
| Registry key involved | HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\DisableAntiSpyware | Registry Editor | -> 1=disabled by policy |
| Relevant service/endpoint URL | https://docs.microsoft.com/en-us/mem/configmgr/protect/deploy-use/manage-antivirus | Microsoft Learn documentation | |
| Log line signature | Event ID 2000-2004, Event ID 5008 | Event Viewer > Applications and Services Logs > Microsoft > Windows > Windows Defender > Operational |
Log Files to Check
C:\Windows\System32\winevt\Logs\Security.evtxC:\Windows\System32\winevt\Logs\Application.evtx
What This Error Actually Means
The error code 0x80070422, which translates to "The service cannot be started" (as seen in Event Viewer > Windows Logs > System with Event ID 7000 or 7023), is raised when the Microsoft Defender Antivirus service, named 'WinDefend', fails to start due to being disabled either by policy or manually. This error can also occur if a critical component of the security system, such as the SecurityHealthService, is not functioning properly. The failure impacts real-time protection and updates for Windows Security features.Affected Versions and Scope
This issue affects all versions of Microsoft Defender for Endpoint on Windows 10 and Windows 11 operating systems. It does NOT affect earlier versions such as Windows 7 or 8, nor does it impact macOS or Linux environments where Microsoft Defender is not natively installed.Where To Look First: Logs and Event IDs
To diagnose the issue, start by checking the following logs:C:\Windows\System32\winevt\Logs\Security.evtxC:\Windows\System32\winevt\Logs\Application.evtx
- Event ID 7000: Service Control Manager failed to start a service (in this case, 'WinDefend')
- Event ID 7023: A service terminated unexpectedly (again, focusing on 'WinDefend')
- Event IDs 2000-2004: These indicate issues with signature updates.
- Event ID 5008: This is logged when the Malware engine fails to load.
Root Causes
Third-party Antivirus Installation
When a third-party antivirus product installs, it often disables Microsoft Defender as part of its exclusive AV setup. To confirm this cause, check the registry keyHKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\DisableAntiSpyware. If set to 1 (enabled by policy), this indicates that another AV solution has disabled Windows Defender.
Group Policy Object Configuration
A GPO can also disable Microsoft Defender. Navigate toComputer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus > Turn off Microsoft Defender Antivirus. If set to 'Enabled', this policy will prevent the service from starting.
Tamper Protection Disabled
Tamper protection, a security feature that prevents unauthorized changes to the antivirus settings, can be disabled by scripts or software. To check if tamper protection is managed centrally via Intune, visitIntune admin center > Devices > Configuration profiles > Endpoint Security policy.
Fix Procedure
To remove the DisableAntiSpyware registry key, run an elevated PowerShell session and execute:
Remove-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender' -Name DisableAntiSpyware -ErrorAction SilentlyContinueNote: Be cautious with this step as it can affect system stability if other policies rely on the DisableAntiSpyware setting.
Removing or modifying registry keys without proper knowledge can cause system instability. Always back up before making changes.Check and set the WinDefend service to Manual start:
$service = Get-Service -Name WinDefend if ($service.StartType -eq 'Disabled') { Set-Service -Name WinDefend -StartupType Manual } Start-Service WinDefendReview and adjust Group Policy settings to allow Microsoft Defender:
gpresult /H gpo.html # Open gpo.html in a browser, search for 'Turn off Microsoft Defender Antivirus' # If set by GPO, update the policy setting to 'Not Configured' via Group Policy Management Console.Enable Tamper Protection through Windows Security:
- Open Windows Security.
- Navigate to Virus & threat protection > Virus & threat protection settings.
- Ensure 'Real-time protection' is On and 'Tamper Protection' is also enabled.
If Tamper Protection is managed centrally, check the Intune Endpoint Security policy:
- Navigate to
Intune admin center > Devices > Configuration profiles > Endpoint Security policy. - Ensure that 'Tamper protection' settings are configured correctly.
- Navigate to
Run a repair operation for Microsoft Defender:
Start-Process -FilePath "C:\Windows\System32\mpcmdrun.exe" -ArgumentList '-RemoveDefinitions -All' -Wait Update-MpSignature
Error Code Variants
| Code | Description | Distinguishing Features |
|---|---|---|
| 0x80070421 | The service has not been started (ERROR_SERVICE_DOES_NOT_EXIST) | This error occurs when the service is missing or corrupted, unlike 0x80070422 where the service exists but cannot start. |
| 0x80070534 | The specified service has been marked for deletion (ERROR_SERVICE_MARKED_FOR_DELETE) | This error indicates that the service is scheduled to be deleted, not just disabled or stopped. |
| 0x800706ba | The service cannot accept control messages at this time (ERROR_SERVICE_CANNOT_ACCEPT_CTRL) | This code suggests a problem with the service's ability to handle control messages rather than starting issues. |
Verification
To verify that the fix has been applied successfully, check:- The 'WinDefend' and 'SecurityHealthService' services should be running in the Services management console.
- In Event Viewer > Windows Logs > System, look for Event ID 7005 (service started) related to these services.
- Ensure that real-time protection is active under Virus & threat protection settings.
Prevention
To prevent recurrence of this issue:- Implement a baseline policy that ensures Microsoft Defender remains enabled and set to start automatically.
- In Intune, create an Endpoint Security policy with Tamper Protection enforced. Use the OMA-URI
.//Device/Vendor/MSFT/Security/TamperProtectionto configure this setting. - Avoid conflicts by ensuring that third-party antivirus solutions do not disable Microsoft Defender through policies or registry settings.
Get-Service -Name WinDefend | Select Name, Status, StartType. This provides immediate insight into whether the service is disabled and needs enabling.