0x800705b4 or null

Fix Windows Defender Real-Time Protection Grayed Out

Real-time protection grayed out in Windows Security? Here's the actual fix plus why it works, and the rarer causes worth checking.

You're not the first to stare at that grayed-out toggle and wonder what kind of joke your Windows install is playing on you. Let's cut the noise and get it working.

The Fix That Actually Works

Open an elevated PowerShell prompt (right-click Start, choose "Windows PowerShell (Admin)" — or Terminal (Admin) on Windows 11 22H2+). Then run these commands in order:

Set-MpPreference -DisableRealtimeMonitoring $false
Set-MpPreference -DisableIOAVProtection $false

If that doesn't flip the toggle, force a policy refresh:

gpupdate /force

Then restart Windows Security (or just close and reopen the app). You should see the toggle clickable again. If not, move on to the next step.

When the commands error out with something like "Access denied" or "The term 'Set-MpPreference' is not recognized," the problem is usually a broken policy key. That's what the registry section below is for.

Why This Works

What's actually happening here is that Defender's state is stored in a few places — the real-time protection flag lives in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Real-Time Protection, but Windows Security reads it through the Windows Management Instrumentation (WMI) interface. When one gets out of sync with the other, the toggle grays out. The Set-MpPreference cmdlet forces both to agree on the same value.

The reason step 3 works is that gpupdate /force re-applies every policy that's cached locally. If a stale group policy object (even from a domain that left you years ago) is overriding Defender's settings, this refresh clears the conflict. It's the same reason you sometimes need to reboot after a domain removal — the local policy cache holds grudges.

Registry Fix for Stubborn Cases

If PowerShell didn't do it, the problem might be a registry key that's blocking changes. Open regedit as admin and delete these keys if they exist:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection

Right-click the Windows Defender key (the one under Policies) and choose Delete. Reboot, then check Windows Security again.

The key insight: those policy keys override local settings. Even if you set the local preference correctly, the policy wins. Deleting them hands control back to you.

Less Common Variations You'll Hit

Tamper Protection is on. This is the sneaky one. If tamper protection is enabled, it blocks any attempt to change Defender's settings — including through PowerShell. You'll see the toggle grayed out but also a message about "Some settings are managed by your organization." The fix is to turn off tamper protection first, then flip real-time monitoring, then re-enable tamper protection. You can usually do this from the Windows Security UI if it's not grayed out itself, but if it is, you'll need to use the Set-MpPreference -DisableTamperProtection $true command from an elevated prompt. Note: this only works on newer builds (Windows 10 1903+ and Windows 11).

Another antivirus is leaving ghost drivers. Sometimes uninstalling a third-party AV leaves behind kernel-mode filter drivers that Windows Security sees as a conflict. Even if the AV is gone, Defender stays shy. Run autoruns (from Sysinternals) as admin, go to the "Filters" tab, and look for anything named like avc3, BHDrvx86, or SymEFASI — if you spot a leftover, uncheck it and reboot. That's not an official fix, but it's saved me twice.

Corrupted WMI repository. This is rarer but real. When WMI gets corrupted, all WMI-based management breaks, and Defender's status becomes unreadable. Check it with:

winmgmt /verifyrepository

If it says the repository is inconsistent, rebuild it:

winmgmt /salvagerepository

That salvages what it can and rebuilds the rest. Reboot after.

Preventing This From Happening Again

Most of the time this grays-out comes from a one-time event: a failed Windows update, an interrupted Defender update, or a policy that got half-applied. Prevention is mostly about not breaking things:

  • Keep Windows Update current. Patch Tuesday updates often include Defender engine fixes that keep these settings in sync.
  • If you use a third-party AV, uninstall it properly — use the manufacturer's removal tool, not just the Control Panel uninstaller. Avast, Norton, and McAfee each have their own.
  • If you're on a domain and you're not supposed to be anymore, leave it cleanly (Remove-Computer -UnjoinDomaincredential) and then gpupdate /force to purge stale policies.
  • And for the love of good security, don't disable real-time protection permanently. If you need to test something, turn it off, test, and turn it back on within the same session. The longer it stays off, the more likely Windows starts thinking you want it off.

Real-time protection is your last line against file-based malware. If you let it stay broken, you're one bad download away from a full-blown infection. Fix it now, and check it every few months — it's a five-second glance at that toggle.

Related Errors in Cybersecurity & Malware
Error -128 Fixing the 'You can't open this app' macOS Gatekeeper error 0X00000540 Fix ERROR_ALLOTTED_SPACE_EXCEEDED (0x540) on Windows Stop Data Loss Prevention Policy Violations Fast PSA-1001 Privileged Session Anomaly Detected – Quick Fixes

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.