Windows Defender offers built-in malware protection for Windows 10 and Windows 11, continuously monitoring for threats and providing real-time scanning. Its integration with the Windows Security framework ensures seamless updates and efficient detection against various forms of malware and spyware. It remains an essential component for maintaining a safe environment on most systems.
Some advanced use cases or development scenarios require disabling Windows Defender to bypass certain restrictions or to run specialized software without interference. Temporary deactivation allows deeper diagnostic processes or performance evaluations while investigating potential malware scanning conflicts. It is crucial, however, to remain vigilant during any period that Windows Defender is disabled, as the risk of infection increases.
Disabling Windows Defender should always be done with caution. Users should consider reactivating it once testing or troubleshooting finishes to ensure the system remains protected. In large-scale or specialized environments, group policies and registry tweaks can automate or enforce this action, but this approach is recommended only for experienced professionals who understand the security implications.
Method 1: Using Windows Security
This method is accessible on most systems and offers a straightforward way to disable Windows Defender without permanently modifying system policies or registry values.
- Open the Windows Security app by searching for “Windows Security” in the Start Menu.
- Select the “Virus & threat protection” panel from the left-hand menu.
- Choose “Manage settings” under the “Virus & threat protection settings” section.
- Toggle off “Real-time protection” and confirm the prompt that appears.
Temporarily disabling Windows Defender increases exposure to threats and should be reversed once specific tasks are complete.
Method 2: Using Group Policy (Advanced)
In certain Windows editions (often Pro or higher), the Local Group Policy Editor can permanently disable real-time protection. This option is best for users familiar with policy management and its impact on system security.
- Press Windows+R, type “gpedit.msc,” then press Enter.
- In the Local Group Policy Editor, navigate to “Computer Configuration” → “Administrative Templates” → “Windows Components” → “Microsoft Defender Antivirus.”
- Double-click “Turn off Microsoft Defender Antivirus” and select “Enabled,” then click “OK.”
- Restart the system to apply the policy changes.
If Local Group Policy Editor is not found, your Windows edition may not support it, or it might require enabling certain administrative tools.
Method 3: Using the Windows Registry (Advanced)
This method involves creating or editing registry entries to disable Windows Defender. It is recommended for advanced users who understand registry modifications and potential system consequences.
- Press Windows+R, type “regedit,” then press Enter to launch the Registry Editor.
- Navigate to “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender.”
- Right-click inside the right pane, select “New,” choose “DWORD (32-bit) Value,” name it “DisableAntiSpyware,” then set its value to “1.”
$ reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f The operation completed successfully.
- Close the Registry Editor and restart the system for the change to take effect.
Related: Re-enabling Windows Defender may require removing or setting “DisableAntiSpyware” to “0,” followed by a system reboot.

Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.