If you want to disable Windows Defender (Microsoft Defender Antivirus), here are the steps you can follow. Use the method that matches your Windows edition.
Warning: Disabling Defender leaves your PC open to viruses and malware. Only do this if you will install another antivirus, or if you are testing something and will turn Defender back on afterwards.
Note: On modern Windows 10 and Windows 11, Tamper Protection blocks most permanent changes to Defender. If a method below does not stick, open Windows Security > Virus & threat protection > Manage settings and turn Tamper Protection off first, then try again.
In this article
How to Disable Windows Defender
Method 1: Windows Security Settings (Temporary)
- Open the Start menu and select Settings (the gear icon).
- Go to Update & Security > Windows Security.
- Click Virus & threat protection.
- Under Virus & threat protection settings, click Manage settings.
- Turn off the Real-time protection switch.
Note: This method is temporary. Windows turns real-time protection back on after a restart.
Method 2: Group Policy Editor (Windows Pro, Enterprise, Education)
- Press
Windows + Rto open the Run dialog. - Type
gpedit.mscand press Enter to open the Local Group Policy Editor. - Go to Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus.
- Double-click Turn off Microsoft Defender Antivirus.
- Select Enabled, then click Apply and OK.
- Restart your computer.
Note: Turn Tamper Protection off first, or this policy is ignored on current Windows versions. Home edition does not include the Group Policy Editor.
Method 3: Registry Editor
- Press
Windows + Rto open the Run dialog. - Type
regeditand press Enter to open the Registry Editor. - Go to:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender. - Right-click the Windows Defender key and select New > DWORD (32-bit) Value.
- Name the new value
DisableAntiSpyware. - Double-click
DisableAntiSpywareand set its value data to1. - Restart your computer.
Note: Since 2020, Microsoft ignores the DisableAntiSpyware value on consumer Windows 10 and 11 while Tamper Protection is on, so this method often has no effect on Home and Pro. It was meant for devices running a different antivirus.
How to Remove Windows Defender
Note: Removing Windows Defender completely is not recommended, because it leaves your system open to threats. If you still want to proceed, follow these steps.
Method 1: PowerShell
- Open PowerShell as administrator. Search for “PowerShell” in the Start menu, right-click it and select Run as administrator.
- Type this command and press Enter to uninstall the Windows Defender features:
Uninstall-WindowsFeature -Name Windows-Defender-Features -ComputerName localhost -IncludeAllSubFeature -Remove
Method 2: DISM Tool
- Open Command Prompt as administrator.
- Type these commands one by one, and press Enter after each one:
dism /online /disable-feature /featurename:Windows-Defender-Featuresdism /online /cleanup-image /startcomponentcleanup - Restart your computer.
Note: The two removal methods above target the “Windows-Defender-Features” role, which exists on Windows Server. On Windows 10 and Windows 11 Home or Pro, Defender is a built-in app, not a removable feature, so these commands will not remove it. On a client PC, use Method 1, 2 or 3 in the section above to disable it instead.
If you remove or disable Defender, install another antivirus right away so your system stays protected. If you later want it back and it will not turn on, see my guide on what to do when Windows Defender will not turn on.






