How to Temporarily Disable Windows Security Defender
In this article
You can temporarily disable Windows Security Defender (Microsoft Defender Antivirus) by turning off real-time protection in the Windows Security app, but Windows will automatically turn it back on after a restart or after a short period. For a longer pause, you can use the Local Group Policy Editor or Registry Editor, but these methods are only available on Windows Pro, Enterprise, or Education editions, and they require administrative rights. Disabling Defender leaves your PC unprotected, so only do it when you have a specific, temporary need and you trust the software you are about to run.
What You'll Need
- A Windows 10 or Windows 11 PC with an administrator account.
- For the longer methods: Windows Pro, Enterprise, or Education (Group Policy Editor is not available on Home).
- Knowledge of the exact time you need Defender off, so you can turn it back on promptly.
- Optionally, a third-party antivirus already installed and up to date, if you plan to keep Defender off for more than a few minutes.
Step-by-Step
- Open Windows Security. Click the Start button, type Windows Security, and press Enter. Alternatively, click the shield icon in the notification area of the taskbar.
- Go to Virus & threat protection. In the left menu (or the main tiles on Windows 11), select Virus & threat protection.
- Open Manage settings. Under Virus & threat protection settings, click Manage settings.
- Turn off Real-time protection. Toggle the switch under Real-time protection to Off. A User Account Control prompt may appear; click Yes. Windows will show a warning that your device is vulnerable. This is expected.
- Confirm the change. The shield icon in the taskbar may show a red X or a warning. Real-time protection is now off until Windows restarts or until the system decides to re-enable it (often within minutes to a few hours).
- For a longer pause (Pro/Enterprise/Education only), use Group Policy. Press Win+R, type gpedit.msc, and press Enter. Navigate to Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus. Double-click Turn off Microsoft Defender Antivirus, select Enabled, and click OK. Restart the PC for the change to take effect.
- Alternative for Pro/Enterprise/Education: Registry Editor. Press Win+R, type regedit, and press Enter. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender. If the key does not exist, right-click the Windows folder, choose New > Key, and name it Windows Defender. In the right pane, right-click, choose New > DWORD (32-bit) Value, name it DisableAntiSpyware, and set its value to 1. Restart the PC. (Note: This policy is deprecated in recent Windows versions and may be ignored by Defender; Group Policy is the more reliable method.)
- Turn Defender back on. Reverse the steps: set Real-time protection back to On, or set the Group Policy to Not Configured or Disabled, or set the registry value to 0, then restart.
Common Mistakes
- Assuming the toggle stays off forever. Real-time protection often re-enables itself after a restart or after a period of time. Do not rely on it for a permanent disable.
- Using Group Policy on Windows Home. The Local Group Policy Editor is not included in Windows Home. Use the Windows Security toggle instead, or upgrade to Pro.
- Forgetting to re-enable Defender. Leaving Defender off long-term exposes your PC to malware. Set a reminder to turn it back on.
- Editing the registry without a backup. Always export the registry key before changing it, or create a System Restore point.
- Disabling Defender while another antivirus is not installed. This leaves you with no active protection. Install and update a reputable third-party antivirus first if you need an extended pause.
- Expecting Tamper Protection to allow changes. If Tamper Protection is on, you may not be able to change some settings. Turn it off temporarily in Windows Security > Virus & threat protection > Manage settings, then try again.
Tips
- Use the shortest possible disable window. Turn Defender off, do the task, turn it back on immediately.
- If you only need to run a specific file, consider adding an exclusion instead of disabling Defender entirely: Windows Security > Virus & threat protection > Manage settings > Add or remove exclusions. This is safer than turning off real-time protection.
- Keep Windows and Defender definitions updated before and after the change.
- On Windows 11, the Windows Security app layout may differ slightly, but the path Virus & threat protection > Manage settings > Real-time protection is consistent.
- If you use Group Policy, remember that the setting applies to all users on the PC.
Troubleshooting
- The toggle is greyed out. This usually means Tamper Protection is on, or your organization manages the device. Check Tamper Protection in Windows Security settings; if it is managed by your organization, contact your IT admin.
- Real-time protection turns back on immediately. Windows may re-enable it automatically. Use Group Policy (Pro/Enterprise/Education) for a longer disable, or add an exclusion for the specific file or folder.
- Group Policy setting does not stick. Ensure you restarted the PC. Also check that no third-party security software is overriding Defender settings.
- Registry change has no effect. The DisableAntiSpyware policy is deprecated and may be ignored. Use Group Policy instead, or accept that only the temporary toggle works.
- You cannot open Windows Security. Restart the PC, then try again. If the app is corrupted, run sfc /scannow from an elevated Command Prompt.
- Defender will not turn back on. Restart the PC. If it still will not turn on, check for third-party antivirus that may have disabled it, and review Group Policy or registry settings you changed.
Frequently Asked Questions
Can I disable Windows Defender permanently?
Not through the normal Windows Security toggle. On Pro, Enterprise, and Education editions, Group Policy can disable it, but Microsoft recommends against permanent disable. On Home, you can only turn off real-time protection temporarily.
Does disabling real-time protection turn off Defender completely?
No. Real-time protection is one component. Other features like cloud-delivered protection and automatic sample submission may remain active. The toggle only stops real-time scanning.
Will Windows re-enable Defender automatically?
Yes, in many cases. Windows may turn real-time protection back on after a restart or after a period of time, especially if it detects no other antivirus.
Is it safe to disable Defender?
Only for short periods and only if you trust the software you are running. Disabling it leaves your PC vulnerable to malware. Re-enable it as soon as possible.
Can I disable Defender on Windows Home?
You can turn off real-time protection temporarily via Windows Security, but you cannot use Group Policy Editor because it is not included in Home. Registry edits may not work reliably.
What is Tamper Protection and does it block disabling Defender?
Tamper Protection prevents unauthorized changes to security settings. If it is on, you may need to turn it off temporarily before changing Defender settings. It can be found in Windows Security > Virus & threat protection > Manage settings.