Security · Windows 11
Fix Windows Security protection that keeps turning itself off
Real-time protection that switches itself back off is rarely a setting you changed — it usually means the Microsoft Defender Antivirus service is not running, or another antivirus has taken over and then failed. Check which protection is actually in charge first, remove the conflict next, and repair the service and system files only if the toggle still will not stay on.
What you need
- An administrator account. Changing protection settings, services, and installed apps all need one.
- A note of any other antivirus you have installed. Trial suites that came with the PC count, even if they expired months ago.
- A few minutes offline is fine. None of these steps need a download until the update step, and that one is optional.
Read the problem before you touch it
- See which antivirus Windows thinks is in charge. Open Windows Security > Virus & threat protection. If the page names a third-party product as your provider, Defender stepping aside is by design — the fault is in that product, not in the toggle. Microsoft describes this page in Virus and threat protection in the Windows Security app.
- Watch what the toggle actually does. Turn Real-time protection on and note whether it flips back instantly, survives until a restart, or stays on but the page shows a warning. Instant flip-back points at a service that cannot start; losing it at restart points at something re-disabling it at sign-in.
- Check for a managed-device message. If the page says some settings are managed by your organization on a work or school PC, stop here — your IT department controls protection, and local changes will keep being reversed.
The simple fixes, in order
- Restart the PC once, then recheck. A protection service that failed to start after an update often starts cleanly on the next boot. Recheck the toggle after the restart before changing anything else, so you know whether the fault is persistent.
- Remove the other antivirus completely. If a third-party antivirus is installed but expired, broken, or unwanted, uninstall it from Settings > Apps > Installed apps, then restart. Microsoft covers the process in Uninstall or remove apps and programs in Windows. Defender should take over on its own after the restart; two half-working products is the most common cause of this symptom.
- Update protection intelligence and Windows. On the Virus & threat protection page, choose Protection updates > Check for updates, then run Windows Update and restart again. A stuck definition update can leave the service refusing to stay on.
- Run a scan once protection stays on for a minute. Choose Scan options > Microsoft Defender Offline scan if the toggle now holds. Something actively turning protection off is exactly the pattern an offline scan is built for, and it runs before Windows fully loads.
The advanced route
- Check the Defender service state. Open Services, find Microsoft Defender Antivirus Service, and confirm it is running with startup type Automatic. If it is stopped, try starting it and note any error — a service that will not start points at damaged files, which the next step repairs. Leave the service's settings as you found them otherwise; forcing startup types by hand rarely fixes the cause.
- Repair system files with DISM, then SFC. Open Windows Terminal as administrator, run
DISM /Online /Cleanup-Image /RestoreHealth, let it finish, then runsfc /scannowand restart. Microsoft documents both tools in Using System File Checker in Windows. - Look for what re-disables it at sign-in. If protection survives a session but is off after every restart, open Task Manager's Startup tab and disable non-essential startup apps for one boot, then test. A leftover "optimizer" or an old security suite's helper is the usual culprit; re-enable items one at a time to find it, then uninstall that app.
End state
- Real-time protection stays on through a full restart, not just for the current session.
- The Virus & threat protection page names one provider only — Defender, or the third-party product you chose.
- A quick scan starts and completes without the page dropping back to a warning.
When it goes wrong
- The toggle is grayed out entirely. That is policy, not damage — on a personal PC, check for a leftover work or school account under Settings > Accounts > Access work or school and disconnect one you no longer use.
- The service will not start even after the file repair. The Defender installation itself is damaged. Use the offline scan from another route if you can, and treat a Windows reset that keeps your files as the next step rather than registry edits copied from a forum.
- Protection turns off only when your other antivirus updates. That product is re-registering itself and failing. Reinstall it from its maker's current installer, or remove it and let Defender run — do not leave both half in charge.
Related fixes
-
Fix Windows Security that opens blank or will not open
When Windows Security opens to a blank page, or closes as soon as it starts, the app package or its service is usually damaged, not the protection itself. Reset the app first, check the service next, then repair the system files if the window still will not load.
-
Fix a drive that keeps reporting a corrupted Recycle Bin
A corrupted Recycle Bin warning that names one drive almost always means that drive's hidden $Recycle.Bin folder is damaged, not that your files are. Empty what you still need from the bin first, delete that one folder so Windows rebuilds it clean, and check the drive only if the warning comes back.
-
Fix a PC that turns itself back on after you shut it down
A PC that restarts itself after shutdown is almost always being woken, not haunted: a wake timer, a network card allowed to wake it, or Fast Startup turning shutdown into a kind of hibernate. Find which wake source fired, then turn that one off.
-
Fix a Windows search box that will not accept typing
When you click the search box and nothing you type appears, the search interface or the text input process has usually stalled, not your keyboard. Restart those processes first, check the search service next, and repair system files only if the box keeps going dead.
Sources
- Microsoft Support, Virus and threat protection in the Windows Security app — the protection page, its provider display, and scan options.
- Microsoft Support, Uninstall or remove apps and programs in Windows — removing a conflicting third-party antivirus.
- Microsoft Support, Using System File Checker in Windows — running DISM and SFC to repair missing or corrupted system files.