Short answer: When Microsoft Defender’s real-time protection keeps turning off, the usual cause is another antivirus product, or leftovers of one you uninstalled, which puts Defender into passive or disabled mode. Check in PowerShell with Get-MpComputerStatus: if AMRunningMode says anything other than Normal, Windows believes another product is protecting the PC. Remove the old product properly with its vendor’s removal tool and restart. If no other antivirus exists and the switch is greyed out with “managed by your organization” or “turned off by Group Policy”, a policy is forcing it. If it flips off with no explanation and Tamper Protection is also off, assume malware may be responsible and run Microsoft Defender Offline before trusting the PC.
First, understand what “turning off” normally looks like
Windows deliberately makes real-time protection hard to leave off. If you switch it off in Windows Security, Microsoft notes it turns itself back on automatically after a short time. So a switch that keeps going off is a sign something is actively changing it, or that Windows thinks it shouldn’t be the main antivirus at all. Note exactly what you see, because the wording points to the cause.

| What you see | Most likely cause | Where to look |
|---|---|---|
| Windows Security says another provider is protecting you | Third-party antivirus installed | Windows Security > Virus & threat protection |
| No other antivirus listed, but real-time is off and won’t stay on | Leftover driver or service from an uninstalled product | Get-MpComputerStatus, installed programs, vendor removal tool |
| Switch greyed out, “managed by your organization” | Policy or registry setting | Policy keys under HKLM\SOFTWARE\Policies\Microsoft\Windows Defender |
| Turns off silently, Tamper Protection also off, unknown exclusions | Malware | Get-MpPreference, Defender Offline scan |
| Turns off after a specific app runs | Optimization or “gaming” tool | Recently installed utilities |
Check Defender’s actual state with PowerShell
Windows Security’s interface summarizes; PowerShell tells you the details. Open PowerShell as administrator and run:
Get-MpComputerStatus | Select-Object AMRunningMode, RealTimeProtectionEnabled, IsTamperProtected, AntivirusEnabled, AMServiceEnabled
Read the results like this. AMRunningMode should say Normal on a PC where Defender is the only antivirus. Passive Mode or SxS Passive Mode means Windows thinks another antivirus product is primary. RealTimeProtectionEnabled False confirms the problem. IsTamperProtected False is worth noting, because Tamper Protection is on by default and stops apps from changing key Defender settings; finding it off when you never touched it is suspicious. If the command fails entirely or says the service isn’t running, the Defender service itself may be disabled, which is common after malware infections and after some third-party installs.
Cause 1: another antivirus, present or half-removed
Windows is designed to run one primary antivirus. When you install Norton, McAfee, Avast, Bitdefender or similar, it registers with Windows Security Center and Defender steps back. That’s expected. The trouble starts when the third-party product expires, or is uninstalled through Settings but leaves drivers or a Security Center registration behind. Windows keeps thinking it’s there, so Defender stays passive.
- Open Windows Security > Virus & threat protection and see whether another provider is named.
- If a product is listed that you thought was gone, download that vendor’s official removal tool from its own website. Most major vendors publish one, because standard uninstallers often leave pieces behind.
- Run the tool, restart, and run
Get-MpComputerStatusagain. AMRunningMode should return to Normal and real-time protection should turn on by itself.
Be careful with products bundled by PC makers. Trial antivirus that came preinstalled often expires quietly and continues to block Defender. Removing it is usually the fix for brand-new laptops that show this problem.
Cause 2: a policy forcing it off
If the toggle is greyed out with a message about your organization or Group Policy, a policy setting is in control. On a work PC that’s intentional, and you should contact IT. On a home PC, it usually comes from a tweaking tool, a script you ran to “debloat” Windows, or malware. We cover the exact registry keys, how to read them and how to remove them safely in our guide to “turned off by Group Policy” in Windows Security, and the broader question of who is managing Defender in “managed by your organization” on a home PC.
Cause 3: malware switching Defender off
Disabling antivirus is one of the first things a lot of malware does after landing. Signs include real-time protection turning off with no other product installed, Tamper Protection disabled, and exclusions you didn’t add. Check exclusions with:

Get-MpPreference | Select-Object ExclusionPath, ExclusionProcess, ExclusionExtension
Exclusions covering whole drives, your user folder, AppData or Temp are a strong red flag. So are exclusions for executables with random names.
If that’s what you find, don’t just flip the switch back on. Disconnect from the internet, then run Microsoft Defender Offline from Windows Security > Virus & threat protection > Scan options. The offline scan restarts the PC and scans before Windows loads, which catches malware that defends itself while Windows is running. Afterwards, remove the suspicious exclusions, turn Tamper Protection back on, and follow our step-by-step guide to removing malware from a Windows PC, including changing passwords from a clean device.
Cause 4: “optimizer” and gaming tools
Some PC optimization tools, game boosters and privacy utilities offer to disable Defender for performance. They may switch it off each time they run or at every boot. Look at recently installed utilities, especially anything advertising FPS gains or “debloating”, and check its settings or uninstall it. If you genuinely need to reduce scanning overhead for development work, exclusions for specific project folders are a far safer option than turning protection off globally.
Turning it back on and keeping it on
- Resolve the cause above first.
- Open Windows Security > Virus & threat protection > Manage settings and switch on Real-time protection, Cloud-delivered protection and Tamper Protection.
- Run
Update-MpSignaturein an admin PowerShell window or click Check for updates under Protection updates. - Restart and check
Get-MpComputerStatusonce more. If real-time protection is still on after a restart and a day of normal use, the fix has held.
If Windows Security itself won’t open or shows a blank page while you’re doing this, see our fixes for Windows Security not opening.
Frequently asked questions
Is it safe to leave real-time protection off if I scan manually?
No. Manual scans find threats after they’ve run. Real-time protection blocks them as files are downloaded and opened, which is when most infections can still be prevented.
Why does Windows turn real-time protection back on after I disable it?
It’s a safety design. Turning it off from Windows Security is meant to be temporary, and Windows re-enables it automatically after a short period.
Can I run Defender alongside another antivirus?
Only in passive or periodic scanning modes. Two products doing full real-time scanning at once cause conflicts, so Windows lets one be primary.
Does Tamper Protection stop me from changing settings?
No. You can still change settings in Windows Security. It blocks other apps, scripts and registry edits from changing them behind your back.



