Skip to content
Follow
Windows 🟡 Intermediate

How to Enable or Disable Microsoft Defender Antivirus in Windows 11

Richard
Written by
Richard
Jul 9, 2021 Updated Jul 22, 2026 6 min read
How to Enable or Disable Microsoft Defender in Windows 11
How to Enable or Disable Microsoft Defender in Windows 11

Microsoft Defender Antivirus, Windows 11's built-in security program, protects your computer from threats. You can easily control whether Microsoft Defender Antivirus is on or off to manage your computer's security settings.

Microsoft Defender Antivirus in Windows 11 allows you to choose to disable Microsoft Defender Antivirus, for example, if you install another antivirus program or need to fix a problem. Windows 11 lets you manage Microsoft Defender Antivirus's status directly.

Microsoft Defender Antivirus turns off automatically when you install a different antivirus program. However, you can manually turn off Microsoft Defender Antivirus if needed. Turning off Microsoft Defender Antivirus also disables its "Periodic Scanning" feature, which checks for threats in the background.

Administrator rights are necessary to make these security changes. Before disabling Microsoft Defender Antivirus, you must first turn off "Tamper Protection" to prevent unwanted changes to your security settings. This guide covers two methods for disabling Microsoft Defender Antivirus: using the Local Group Policy Editor for Windows 11 Pro, Enterprise, and Education versions, or the Registry Editor for all Windows 11 editions.

⚡ Quick Answer

You can enable or disable Microsoft Defender via Windows Settings by going to Privacy & security, then Windows Security, and clicking Open Windows Security. From there, manage Virus & threat protection or Firewall & network protection settings.

Method 1Using the Local Group Policy Editor (🪟 Windows 11 Pro, Enterprise, Education)

The Local Group Policy Editor in Windows 11 allows you to manage Microsoft Defender Antivirus settings. This tool is available in Windows 11 Pro, Enterprise, and Education editions, offering direct control over the antivirus program's behavior.

Step 1Open the Local Group Policy Editor

Press the Windows key and the R key on your keyboard at the same time. This opens a small window called “Run.” Type gpedit.msc into the box and press Enter or click OK. The Local Group Policy Editor will open.

Step 2Find the Microsoft Defender Settings

In the Local Group Policy Editor, look at the left side. You’ll see folders. Click on “Computer Configuration.” Then, click on “Administrative Templates.” Next, click on “Windows Components.” Finally, find and click on “Microsoft Defender Antivirus.”

Step 3Find the “Turn off Microsoft Defender Antivirus” Setting

On the right side of the Registry Editor window, a list of settings appears. Scroll down this list until you find the setting named "Turn off Microsoft Defender Antivirus." Double-click "Turn off Microsoft Defender Antivirus" to open its configuration.

Local Group Policy Editor screen for disabling Microsoft Defender Antivirus.
Local Group Policy Editor screen for disabling Microsoft Defender Antivirus.

Step 4Choose Whether to Enable or Disable

In the Local Group Policy Editor, you’ll see a window where you pick if you want to turn off Microsoft Defender Antivirus. Choosing ‘Enabled’ tells Windows to turn it off, while ‘Disabled’ keeps it running. ‘Not Configured’ lets Windows decide, usually turning Defender off if another antivirus is active.

  • Not Configured: This is the default. Windows decides what to do, usually turning off Defender if another antivirus is active.
  • Enabled: If you choose this, you are telling Windows to turn off Microsoft Defender Antivirus.
  • Disabled: If you choose this, you are telling Windows to keep Microsoft Defender Antivirus running.

To turn off Microsoft Defender Antivirus:

Select the circle next to “Enabled.” Then, click “Apply” and click “OK.”

To turn on Microsoft Defender Antivirus (or make sure it’s running):

Select the circle next to “Not Configured” or “Disabled.” “Not Configured” is usually best because it lets Windows manage it. Click “Apply” and then “OK.”

Group Policy Editor options to disable Microsoft Defender Antivirus in Windows 11.
Group Policy Editor options to disable Microsoft Defender Antivirus in Windows 11.

Step 5Close the Editor and Restart Your PC

After making changes in the Local Group Policy Editor, close the window. To make sure your computer understands the new settings, you must restart it. Click the Start button, go to Power, and then select Restart. Remember, turning off your main antivirus leaves you open to threats.

⚠️Warning
Turning off your main antivirus program leaves your computer at risk from viruses and malware. Only do this if you have another strong antivirus program installed and running, or if you are doing temporary troubleshooting.

Method 2Using the Registry Editor (All 🪟 Windows 11 Editions)

You can use the Registry Editor to manage Microsoft Defender if you are not using Windows 11 Home. The Registry Editor tool works on all Windows 11 versions. Be very careful when editing the registry, as mistakes can cause problems, so back up the registry first.

Step 1Turn Off Tamper Protection First!

You must turn off Tamper Protection before you can disable Microsoft Defender using the Registry Editor. Open the ‘Windows Security’ app by searching for it. Go to ‘Virus & threat protection,’ then click ‘Manage settings’ under ‘Virus & threat protection settings.’ Finally, scroll down to find and turn off ‘Tamper Protection.’

  • Open the “Windows Security” app. You can find it by searching for it in the Start menu.
  • Click on “Virus & threat protection.”
  • Scroll down to “Virus & threat protection settings” and click “Manage settings.”
  • Scroll down again to “Tamper Protection” and switch it to “Off.” You might need to click “Yes” on a User Account Control (UAC) prompt.

Step 2Open the Registry Editor

Press the Windows key and the R key together. In the “Run” box, type regedit and press Enter or click OK. Click “Yes” if a User Account Control prompt appears.

Step 3Go to the Correct Registry Location

Inside the Registry Editor, you need to navigate to a specific folder. Look for this exact path on the left side: 🗝️HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender. If the ‘Windows Defender’ folder isn’t there, right-click on ‘Microsoft,’ select ‘New,’ then ‘Key,’ and name it ‘Windows Defender.’

Step 4Create or Change the “DisableAntiSpyware” Setting

The Registry Editor allows you to change Windows Defender settings. Within the Windows Defender folder, locate the right-hand pane. Create or change the DWORD (32-bit) Value named DisableAntiSpyware. Right-click in the empty space, select 'New,' then 'DWORD (32-bit) Value,' and name it DisableAntiSpyware. Double-click the DisableAntiSpyware value to change its data.

To turn off Microsoft Defender Antivirus:

  • Right-click in the empty space on the right side.
  • Choose “New,” then “DWORD (32-bit) Value.”
  • Name the new setting exactly: DisableAntiSpyware.
  • Double-click on the new DisableAntiSpyware setting.
  • In the “Value data” box, type 1.
  • Click “OK.”

To turn on Microsoft Defender Antivirus (or make sure it’s running):

  • If the DisableAntiSpyware setting is there, double-click it.
  • Change the “Value data” to 0.
  • Click “OK.”
  • If the DisableAntiSpyware setting doesn’t exist, you can delete it if you created it earlier to turn off Defender. Right-click on DisableAntiSpyware and choose “Delete.” Click “Yes” to confirm.
💡Tip
Setting DisableAntiSpyware to 0 or deleting it tells Windows to let Microsoft Defender run normally. If you’re not sure, setting it to 0 is a safe way to turn it back on.

Step 5Close the Registry Editor and Restart Your PC

After you make your changes, close the Registry Editor. Like with the Group Policy method, you need to restart your computer for the changes to take effect. Click Start > Power > Restart.

Step 6Turn Tamper Protection Back On (If You Turned It Off)

After your computer restarts and you see that Microsoft Defender is working the way you want, it’s a good idea to turn Tamper Protection back on for security. Follow the same steps as in Step 1, but this time, switch Tamper Protection back to “On.”

Summary

You can manage Microsoft Defender Antivirus in Windows 11 using either the Local Group Policy Editor or the Registry Editor. Remember to always turn off Tamper Protection first before disabling Defender, and restart your PC after making any changes. Consider your computer’s security carefully before turning off your antivirus.

Was this guide helpful?

Tags: #Windows 11
Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Enable or Disable Windows Spotlight in Windows 11
Windows How to Enable or Disable Windows Spotlight in Windows 11
How to Refresh Wi-Fi Networks in Windows 11
Windows How to Refresh Wi-Fi Networks in Windows 11
How to Enable or Disable Windows 11 Notifications
Windows How to Enable or Disable Windows 11 Notifications
How to Enable or Disable Snipping Tool in Windows 11
Windows How to Enable or Disable Snipping Tool in Windows 11

14 Comments

Leave a Comment

Your email address will not be published. Required fields are marked *