Windows

How to Enable or Disable Microsoft Defender Antivirus in Windows 11

How to Enable or Disable Microsoft Defender Antivirus in Windows 11
Richard
Written byRichardTech Writer, IT Professional
Jan 27, 2022 Updated Apr 15, 2026 2 min read

This guide explains how to manage Microsoft Defender Antivirus in Windows 11 on your Windows 11 computer.

Microsoft Defender is the free security tool built into Windows. It guards your computer against viruses and other digital dangers. It runs in the background to watch your files and keep your data safe.

Why do this? Sometimes, you may need to turn it off to install a specific program or run a tool that the scanner accidentally blocks.

What happens when done? Your computer will stop scanning for threats. You will be at a much higher risk of catching viruses or malware.

Note: You must have administrator privileges to follow these steps.

How to Change Microsoft Defender Settings

Microsoft suggests keeping this feature turned on at all times. If you must change it, follow these steps carefully.

Open the Start menu and search for Edit group policy. Click it to open the Local Group Policy Editor.

windows 11 edit group policy

In the list on the left, click through this path: Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus.

Steps to turn off Microsoft Defender Antivirus in Windows 11

On the right side, find the setting named Turn off Microsoft Defender Antivirus and double-click it.

Guide to enable or disable Microsoft Defender Antivirus

To turn the antivirus off, select Enabled. To turn it back on later, select Not configured.

Click OK and close the window.

Microsoft Defender Antivirus settings not configured in Windows 11

Close the Local Group Policy Editor.

Change Settings Using the Command Prompt (Admin Required)

Open the Windows Terminal app as an administrator and run the commands below:

To enable Defender:

reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /f

To disable Defender:

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f

Summary

Microsoft Defender is your computer’s main line of defense. You can turn it on or off using the Local Group Policy Editor or the command line, but you must have administrator rights to do so. Turning it off is not recommended because it stops all automatic protection. If you must disable it for a specific task, turn it back on as soon as you are finished to keep your system safe. Tamper Protection Local Group Policy Editor

Was this guide helpful?

Tags: #Windows 11
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, the owner and lead writer at Geek Rewind, is a tech enthusiast passionate about simplifying complex IT topics. His years of hands-on experience in system administration and enterprise IT operations have honed his ability to provide practical insights 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.

2452 articles → Twitter

📚 Related Tutorials

How to Enable Tamper Protection in Windows 11
Windows How to Enable Tamper Protection in Windows 11
How to Turn On or Off Cloud Protection for Microsoft Defender Antivirus in Windows 11
Windows How to Turn On or Off Cloud Protection for Microsoft Defender Antivirus in Windows 11
How to Reset Local Group Policy in Windows 11
Windows How to Reset Local Group Policy in Windows 11
How to Check Your Microsoft Defender Antivirus Signature Version in Windows 11
Windows How to Check Your Microsoft Defender Antivirus Signature Version in Windows 11

Leave a Reply

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