Use this when real-time protection is off or slows the system.
Real-time Protection
Real-time protection scans files and processes as they are opened, written or run, blocking malware before it executes. Check it with Get-MpComputerStatus and RealTimeProtectionEnabled.
1. RealTimeProtectionEnabled = True?
2. Disabled by policy or third-party AV?
3. Tamper Protection prevents disabling.
4. Behaviour monitoring on.
5. Test with EICAR.
file access/process start → scanned in real time
Context & applicabilityCommon mistakes · platform/version boundaries
- Real-time protection turned off for "performance" and never re-enabled.
- Tamper protection off, letting malware or scripts disable Defender.
- Third-party antivirus removed but Defender left in passive mode.
- Not checking
AMRunningMode—Passive modeorEDR Block Modebehave differently fromNormal.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks and settings Verify boundary
Get-MpPreference | Select DisableRealtimeMonitoring,DisableBehaviorMonitoring,DisableIOAVProtection. Real-time protection should be enforced by policy with tamper protection on, so malware or users cannot turn it off. High CPU from MsMpEng often comes from scanning busy folders; fix with targeted, documented exclusions (for example database files per vendor guidance), not by disabling protection.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Real-time protection scans files on access.
- Exclusions reduce what it scans.
- Policy can turn it off.
Get-MpComputerStatus— Defender state and signature ageGet-MpPreference— configuration incl. exclusionsGet-MpThreat / Get-MpThreatDetection— threats and detectionsUpdate-MpSignature— update signaturesStart-MpScan -ScanType QuickScan— run a scan
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Real-time protection scans files on access and execution, monitors behaviour and scripts (AMSI), and blocks network connections to malicious destinations (network protection).
Get-MpComputerStatus | Select RealTimeProtectionEnabled,BehaviorMonitorEnabled,IoavProtectionEnabled,OnAccessProtectionEnabled
Get-MpThreatDetection | Sort InitialDetectionTime -Desc | Select -First 10
High CPU from MsMpEng.exe usually comes from scanning busy folders (build output, database files, VM disks, backup targets) — use documented, narrow exclusions rather than disabling protection.
ReferenceConfiguration & state1 section · depth on demand
Commands
Get-MpComputerStatus | Select RealTimeProtectionEnabled,IsTamperProtected,AMRunningMode
Set-MpPreference -DisableRealtimeMonitoring $false
Documented example, not captured output. With tamper protection on, local changes to protection settings are blocked; manage them through Intune or Defender for Endpoint.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Microsoft Defender → Real-time Protection. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/defender/ · confidence 94%