Windows Defender can be disabled for a few hours, but the steps depend on what you're trying to do
Windows Defender turns itself back on automatically after a set time, so you cannot permanently disable it through the normal settings. If you need to run a program that Defender is blocking, you have three routes: add that program to an exclusion list (so Defender ignores it), turn off real-time protection temporarily, or disable Defender entirely through Group Policy or the Registry — though the last option requires administrator access and Defender will re-enable itself after a restart or after Windows Update runs.
The fastest route for most people is the exclusion list, because Defender stays on and you do not have to remember to turn it back on. If you need Defender completely off for a specific task, real-time protection toggle is simpler than Group Policy, though it only lasts until your next restart.
Key Takeaways
- Adding a program to Defender's exclusion list lets it run without triggering Defender, and Defender stays on to protect everything else.
- Turning off real-time protection through Settings disables scanning but lasts only until you restart your computer.
- Disabling Defender through Group Policy or Registry requires administrator access and will re-enable after restart or Windows Update.
- Windows Defender cannot be permanently disabled on most home versions of Windows — it re-enables itself automatically.
Adding a program to the exclusion list (keeps Defender on)
This is the safest way to stop Defender from blocking a specific program. Open Windows Security by typing "Windows Security" into the taskbar search box and clicking the app. Go to Virus & threat protection, then scroll down and click Manage settings under "Virus & threat protection settings".
Click Add or remove exclusions. You can exclude a folder, file, file type, or process. If you want to exclude a single program, click Add an exclusion, choose File, then navigate to the program's .exe file and select it. If you want to exclude an entire folder (for example, a game installation directory), choose Folder instead and select the folder. Once added, Defender will not scan that location.
This method leaves Defender running and protecting the rest of your system. The exclusion stays in place until you remove it, so you do not have to repeat the steps each time you run the program.
Turning off real-time protection temporarily
Open Windows Security and go to Virus & threat protection. Under "Virus & threat protection settings", you will see a toggle for Real-time protection. Click it to turn it off. Windows will ask you to confirm; click Yes.
Real-time protection will stay off until you restart your computer or manually turn it back on. This disables active scanning but does not remove Defender itself — it will resume protecting your system as soon as you restart or flip the toggle back on. This is useful if you need to run something for a short time and want to be sure Defender is not interfering.
You will see a notification in the taskbar that Defender is off. Do not ignore this notification for long — turn protection back on as soon as you are done with whatever task required it off.
Disabling Defender through Group Policy (Windows Pro and higher)
This method works only on Windows Pro, Enterprise, or Education editions. Home editions do not have Group Policy Editor. Press Windows key + R, type gpedit.msc, and press Enter. Navigate to Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus.
Look for a policy called Turn off Microsoft Defender Antivirus. Double-click it and select Enabled, then click OK. Defender will turn off when ready. However, it will re-enable itself when you restart your computer or when Windows Update runs, so this is not a permanent solution.
To turn Defender back on before a restart, return to the same policy, select Not Configured, and click OK.
Disabling Defender through the Registry (all Windows versions)
This method works on any Windows version but requires administrator access and carries more risk than Group Policy because a Registry mistake can cause problems. Press Windows key + R, type regedit, and press Enter. Click Yes when prompted for administrator permission.
Navigate to HKEY_LOCAL_MACHINE > SOFTWARE > Policies > Microsoft > Windows Defender. If the Windows Defender folder does not exist, right-click the Microsoft folder, select New > Key, and name it "Windows Defender". Inside the Windows Defender folder, right-click the empty space, select New > DWORD (32-bit) Value, and name it DisableAntiSpyware. Double-click it, change the value to 1, and click OK.
Defender will turn off when ready. To turn it back on, change the DisableAntiSpyware value back to 0. Like Group Policy, this will not survive a restart — Defender re-enables itself automatically.
Why Defender keeps turning itself back on
Windows is designed to keep Defender running because it is your primary defense against malware. Even if you disable it through settings, Group Policy, or Registry, Defender re-enables itself after a restart or when Windows Update runs. This is intentional — Microsoft does not want users to accidentally leave their systems unprotected.
If you find yourself disabling Defender repeatedly, the real problem is usually that Defender is blocking something you need to use. In that case, the exclusion list is the right solution, not repeated disabling. If Defender is blocking something you trust, add it to exclusions and leave Defender on.
When you should not disable Defender
Do not disable Defender to run a program you downloaded from an untrusted source or that you do not understand. If a program requires Defender to be off, that is a warning sign — legitimate software does not ask you to disable your antivirus. If you are unsure whether a program is safe, search for its name plus "malware" or "virus" before running it, or upload the file to VirusTotal.com to scan it with multiple antivirus engines.
Disabling Defender leaves your system vulnerable while it is off. The longer it stays off, the greater the risk. If you must disable it, do so for the shortest time possible and turn it back on when ready after.
Frequently Asked Questions
Will disabling Defender slow down my computer?
Turning off real-time protection may free up a small amount of CPU and memory, but the difference is usually not noticeable on modern computers. Defender is designed to run in the background without significantly impacting performance. If your computer feels slow, the problem is usually something else — check your disk usage, RAM, or running programs in Task Manager.
Can I use a different antivirus with Defender on?
Most third-party antivirus programs will automatically disable Defender when they install, or they will ask you to disable it. Running two antivirus programs at the same time can cause conflicts and slow your system. If you install a different antivirus, let it handle the disabling — do not disable Defender manually and then install another program.
What is the difference between disabling Defender and adding an exclusion?
An exclusion tells Defender to skip scanning a specific file, folder, or program, but Defender stays on and protects everything else. Disabling Defender turns off all scanning. Exclusions are safer because the rest of your system stays protected. Use exclusions when you trust a specific program; use disabling only when you need to test something or run a task that Defender is actively interfering with.
Does disabling Defender affect Windows Update?
No. Windows Update runs independently of Defender. However, Windows Update will re-enable Defender if you have disabled it, so if you turn Defender off and then restart your computer, it will be back on after the restart completes.
Can I disable Defender on Windows 11?
Yes, using the same methods — real-time protection toggle, Group Policy (Pro and higher), or Registry. However, Windows 11 makes it harder to permanently disable Defender because it re-enables itself more aggressively than earlier versions. The exclusion list remains the most practical option for most users.