Privacy and Security Enable or Disable Microsoft Defender Antivirus in Windows 11


  • Staff
Windows_Security_banner.png

Microsoft Defender Antivirus is an antivirus software that is included in Windows 11 and can help protect your device from viruses, malware, and other threats.

This tutorial will show you how to enable or disable Microsoft Defender Antivirus in Windows 11.


You must be signed in as an administrator to enable or disable Microsoft Defender Antivirus.

If a third party antivirus product is installed, registered, and working correctly, Microsoft Defender Antivirus will automatically disable itself. The Windows Security app will change the Virus & threat protection section to show status about the AV product, and provide a link to the product's configuration options.

If you disable Microsoft Defender Antivirus, you will not be able to turn on Periodic Scanning.


It is required to turn off Tamper Protection before being able to disable Microsoft Defender Antivirus.



Contents

  • Option One: Enable or Disable Microsoft Defender Antivirus in Local Group Policy Editor
  • Option Two: Enable or Disable Microsoft Defender Antivirus using REG file


EXAMPLE: Microsoft Defender Antivirus disabled

Microsoft_Defender_Antivirus_disabled-1.png
Microsoft_Defender_Antivirus_disabled-2.png

Scan_with_Microsoft_Defender_enabled.png
Scan_with_Microsoft_Defender_diabled.png





Option One

Enable or Disable Microsoft Defender Antivirus in Local Group Policy Editor


The Local Group Policy Editor is only available in the Windows 11 Pro, Enterprise, and Education editions.

All editions can use Option Two for the same policy.


1 Open the Local Group Policy Editor (gpedit.msc).

2 Navigate to the policy location below in the left pane of the Local Group Policy Editor. (see screenshot below)

Computer Configuration>Administrative Templates>Windows Components>Microsoft Defender Antivirus

Microsoft_Defender_Antivirus_gpedit-1.png

3 In the right pane of Microsoft Defender Antivirus in the Local Group Policy Editor, double click/tap on the Turn off Microsoft Defender Antivirus policy to edit it. (see screenshot above)

4 Do step 5 (enable) or step 6 (disable) below for what you would like to do.


5 Enable Microsoft Defender Antivirus

This is the default setting.


A) Select (dot) Not Configured. (see screenshot below)​

B) Click/tap on OK, and go to step 7 below.​

Microsoft_Defender_Antivirus_gpedit-2.png

6 Disable Microsoft Defender Antivirus

A) Select (dot) Enabled. (see screenshot below)​

B) Click/tap on OK, and go to step 7 below.​

Microsoft_Defender_Antivirus_gpedit-3.png

7 Close the Local Group Policy Editor.

8 Restart the computer to fully apply.

9 If you enabled Microsoft Defender Antivirus, you may also want to turn on Tamper Protection again.




Option Two

Enable or Disable Microsoft Defender Antivirus using REG file


1 Do step 2 (enable) or step 3 (disable) below for what you would like to do.

2 Enable Microsoft Defender Antivirus

This is the default setting.


A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Enable_Microsoft_Defender_Antivirus.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender]
"DisableAntiSpyware"=-

3 Disable Microsoft Defender Antivirus

A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Disable_Microsoft_Defender_Antivirus.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender]
"DisableAntiSpyware"=dword:00000001

4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 Restart the computer to fully apply.

8 You can now delete the downloaded .reg file if you like.

9 If you enabled Microsoft Defender Antivirus, you may also want to turn on Tamper Protection again.


That's it,
Shawn Brink


 

Attachments

  • Windows_Security.png
    Windows_Security.png
    6 KB · Views: 91
  • Enable_Microsoft_Defender_Antivirus.reg
    614 bytes · Views: 212
  • Disable_Microsoft_Defender_Antivirus.reg
    648 bytes · Views: 219
Last edited:

unifex

Well-known member
Member
VIP
Local time
7:24 AM
Posts
251
Visit site
OS
Windows 10
Great tutorial, as always! I have one question though - for a long time now I've been using ESET Internet Security which comes with both the antivirus and firewall. Once this is installed, Windows Defender "lays low" - it's not disabled, but it also appears to do nothing - there are no pop-ups, notifications, etc., but the Windows Defender Firewall service is running. I assume that disabling Defender per this tutorial will also turn off that service. Is there any downside to that? Is this service necessary when a third-party firewall is being used?
 

My Computer

System One

  • OS
    Windows 10
    Computer type
    PC/Desktop
    CPU
    i5-10600K
    Motherboard
    Asus Rog Strix Z490-A Gaming
    Memory
    16 GB
    Graphics Card(s)
    GeForce GTX 1650
    Monitor(s) Displays
    Samsung U32J59x 32" 4K
    Screen Resolution
    3840x2160

Brink

Administrator
Staff member
MVP
Thread Starter
Local time
1:24 AM
Posts
8,355
Visit site
OS
Windows 11 Pro for Workstations
Great tutorial, as always! I have one question though - for a long time now I've been using ESET Internet Security which comes with both the antivirus and firewall. Once this is installed, Windows Defender "lays low" - it's not disabled, but it also appears to do nothing - there are no pop-ups, notifications, etc., but the Windows Defender Firewall service is running. I assume that disabling Defender per this tutorial will also turn off that service. Is there any downside to that? Is this service necessary when a third-party firewall is being used?

Hello mate, :)

This will not affect Windows Defender Firewall. Only Microsoft Defender Antivirus. I wouldn't recommend to disable Windows Defender Firewall. The extra security is good to have, and will not hurt anything.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    1TB Samsung 980 PRO M.2,
    6TB WD Black WD6001FZWX
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    Linksys EA9500 router,
    Motorola MB8611 cable modem,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S20 Ultra 5G phone
  • Operating System
    Windows 11 Pro for Workstations
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1
    CPU
    i7-1065G7 3.9 GHz
    Memory
    16 GB LPDDR4-3200
    Graphics card(s)
    Intel Iris Plus
    Sound Card
    Intel SST
    Monitor(s) Displays
    13.3" 4K UWVA AMOLED multitouch
    Screen Resolution
    3840 x 2160
    Hard Drives
    512 GB PCIe NVMe M.2 SSD
    Browser
    Google Chrome
    Antivirus
    Windows Defender and Malwarebytes Premium

unifex

Well-known member
Member
VIP
Local time
7:24 AM
Posts
251
Visit site
OS
Windows 10

My Computer

System One

  • OS
    Windows 10
    Computer type
    PC/Desktop
    CPU
    i5-10600K
    Motherboard
    Asus Rog Strix Z490-A Gaming
    Memory
    16 GB
    Graphics Card(s)
    GeForce GTX 1650
    Monitor(s) Displays
    Samsung U32J59x 32" 4K
    Screen Resolution
    3840x2160

Refaus

New member
Local time
7:24 AM
Posts
7
Visit site
OS
Windows 11
The Group Policy option doesn't work in Windows 11 22H2. Turn off Microsoft Defender Antivirus reverts to "Not Configured" after a restart.
It works now. I had to toggle tamper protection on and off again.
 

My Computer

System One

  • OS
    Windows 11

Refaus

New member
Local time
7:24 AM
Posts
7
Visit site
OS
Windows 11
Looks like I spoke too soon. This setting just doesn't stick. After some time, it reverts to "Not Configured" and I see Windows Defender being enabled again.

And no, it's not caused by any updates. This is a fully offline PC.
 

My Computer

System One

  • OS
    Windows 11

Refaus

New member
Local time
7:24 AM
Posts
7
Visit site
OS
Windows 11
I also tried the registry option and it didn't work permanently either. It worked at first, it survived a few restarts/shutdowns too. But after some time, it didn't anymore. And the registry entry was deleted.

This is with 22H2 Education edition. As I said the system is offline, it's never been connected to the internet.

I saw other people elsewhere reporting the same, these settings don't work permanently in W11, even though they did in W10.
I suggest you test this again, you can do it in a VM perhaps. And if these settings don't stick, it's better to edit/remove this tutorial, because otherwise it's misleading.
 

My Computer

System One

  • OS
    Windows 11

Brink

Administrator
Staff member
MVP
Thread Starter
Local time
1:24 AM
Posts
8,355
Visit site
OS
Windows 11 Pro for Workstations
I also tried the registry option and it didn't work permanently either. It worked at first, it survived a few restarts/shutdowns too. But after some time, it didn't anymore. And the registry entry was deleted.

This is with 22H2 Education edition. As I said the system is offline, it's never been connected to the internet.

I saw other people elsewhere reporting the same, these settings don't work permanently in W11, even though they did in W10.
I suggest you test this again, you can do it in a VM perhaps. And if these settings don't stick, it's better to edit/remove this tutorial, because otherwise it's misleading.
The problem is we never can fully track down what is re-enabling it despite being disable by group policy. :(
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    1TB Samsung 980 PRO M.2,
    6TB WD Black WD6001FZWX
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    Linksys EA9500 router,
    Motorola MB8611 cable modem,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S20 Ultra 5G phone
  • Operating System
    Windows 11 Pro for Workstations
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1
    CPU
    i7-1065G7 3.9 GHz
    Memory
    16 GB LPDDR4-3200
    Graphics card(s)
    Intel Iris Plus
    Sound Card
    Intel SST
    Monitor(s) Displays
    13.3" 4K UWVA AMOLED multitouch
    Screen Resolution
    3840 x 2160
    Hard Drives
    512 GB PCIe NVMe M.2 SSD
    Browser
    Google Chrome
    Antivirus
    Windows Defender and Malwarebytes Premium

TairikuOkami

Brony
Power User
VIP
Local time
7:24 AM
Posts
681
Visit site
OS
Windows 11 Home
I also tried the registry option and it didn't work permanently either.
There is a grace period since people tend to forget to enable it back, other AVs are set like that too.
You can disable it's services to keep it off, but you might need to install 3rd party AV to be able to do it.
Code:
reg add "HKLM\System\CurrentControlSet\Services\WdFilter" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKLM\System\CurrentControlSet\Services\WdNisDrv" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKLM\System\CurrentControlSet\Services\WdNisSvc" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKLM\System\CurrentControlSet\Services\WinDefend" /v "Start" /t REG_DWORD /d "4" /f
 

Attachments

  • capture-02052023-133321.jpg
    capture-02052023-133321.jpg
    116.8 KB · Views: 4
  • capture-02052023-131535.jpg
    capture-02052023-131535.jpg
    182.7 KB · Views: 4

My Computer

System One

  • OS
    Windows 11 Home
    CPU
    AMD Ryzen 5 3600 (07/19)
    Motherboard
    MSI B450 TOMAHAWK 7C02v1E (07/19)
    Memory
    4x 8GB ADATA XPG GAMMIX D10 DDR4 3200MHz CL16
    Graphics Card(s)
    MSI Radeon RX 580 ARMOR 8G OC @48FPS (08/19)
    Sound Card
    Creative Sound Blaster Z (11/16)
    Monitor(s) Displays
    24" AOC G2460VQ6 (01/19)
    Screen Resolution
    1920×1080@75Hz + FreeSync (DisplayPort)
    Hard Drives
    ADATA XPG GAMMIX S11 Pro SSD 512GB (07/19)
    PSU
    Seasonic M12II-520 80 Plus Bronze (11/16)
    Case
    Lian Li PC-7NB + 3x Noctua NF-S12A FLX@700rpm (11/16)
    Cooling
    CPU Cooler Noctua NH-U12S@700rpm
    Keyboard
    HP Wired Desktop 320K Keyboard (04/22)
    Mouse
    HP Wireless Silent 280M Mouse (05/21)
    Internet Speed
    400/40 Mbps via RouterOS (05/21) + TCP Optimizer
    Browser
    Edge with Neeva (No FB/Google) + Brave for YouTube + LibreWolf for FB
    Antivirus
    NoAV + Binisoft WFC + NextDNS
    Other Info
    Headphones: Sennheiser RS170 (09/10)

ThrashZone

Minor Threat
Power User
VIP
Local time
1:24 AM
Posts
1,407
Visit site
OS
Linux-Mint-Cinnamon-20.2 Win-7-10-11Pro's
Hi,
Here's the code I use from W1zzard on TPU
Code:
rem Disable Windows Defender. For this to work you have to manually disable "Tamper protection"
powershell "if ((Get-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows Defender\Features').TamperProtection -eq 4) { exit 0; } ; Write-Output 'Windows Defender can not be disabled, Tamper Protection is still active' '' 'Disable Tamper Protection manually, then press OK' | msg /w *"
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Spynet" /v SpyNetReporting /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Spynet" /v SubmitSamplesConsent /t REG_DWORD /d 2 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender" /v DisableRoutinelyTakingAction /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v DisableRealtimeMonitoring /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer" /v SmartScreenEnabled /t REG_SZ /d "Off" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender" /v DisableRoutinelyTakingAction /t REG_DWORD /d 1 /f
reg delete HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v SecurityHealth /f

 

My Computer

System One

  • OS
    Linux-Mint-Cinnamon-20.2 Win-7-10-11Pro's
    Computer type
    PC/Desktop
    Manufacturer/Model
    asus x3
    CPU
    10900k & 9940x & 5930k
    Motherboard
    z490-Apex & x299-Apex & x99-Sabertooth
    Memory
    Trident-Z Royal 4000c16 2x16gb & Trident-Z 3600c16 4x8gb & 3200c14 4x8gb
    Graphics Card(s)
    Titan Xp & 1080ti FTW3 & evga 980ti gaming
    Sound Card
    Onboard Realtek x3
    Monitor(s) Displays
    1-AOC G2460PG 24"G-Sync 144Hz/ 2nd 1-ASUS VG248QE 24"/ 3rd LG 43" series
    Screen Resolution
    1920-1080 not sure what the t.v is besides 43" class scales from 1920-1080 perfectly
    Hard Drives
    To many to list
    PSU
    1000p2 & 1200p2 & 850p2
    Case
    D450 x2 & 1 Test bench in cherry Entertainment center
    Cooling
    Custom water loops x3 with 2x mora 360mm rads only 980ti gaming air cooled
    Keyboard
    G710+x3
    Mouse
    Redragon x3
    Internet Speed
    xfinity gigabyte
    Browser
    Firefox
    Antivirus
    mbam pro

Wisewiz

Speaks Ancient Geek
Power User
VIP
Local time
2:24 AM
Posts
1,355
Location
Ontario, Canada
Visit site
OS
11 Pro 22H2 (22621.1265)
I have had nothing but good results from using Windows Defender Control (freeware) from Sordum. Getting it installed is challenging, because its sole reason for existence is to stop (and restart) Defender, and Defender objects to a program that can do that. I had to set up an exception in Defender, and then Malwarebytes Premium grabbed it, and I had to set up an exception in that. Since then, it works perfectly as advertised, and I use it once a month or so, in conjunction with Disk Cleanup. It makes possible the significant cleanup of the Defender's history (from, say, 30MB to a few bytes), and then it responds (always, to date) to my request to turn on WD again. When I start the WD Control utility, I use its shortcut to Defender's Tamper Protection panel, click that off, and then disable Defender for a few moments while I run the cleanup function of Disk Cleanup. Then I enable WD with WD Control and finally turn on Tamper Protection.

When I run a quick scan with Defender, it always reports that it has skipped the WD Control folder. Right.

Clipboard01.jpg


Clipboard02.jpg
 

My Computers

System One System Two

  • OS
    11 Pro 22H2 (22621.1265)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo ThinkCentre M920S SFF
    CPU
    i5-8400 @ 2.80MHz
    Motherboard
    Lenovo
    Memory
    16GB DDR4 @ 2666MHz
    Graphics Card(s)
    Intel HD 630 Graphics onboard
    Sound Card
    Realtek HD Audio
    Monitor(s) Displays
    LG E2442
    Screen Resolution
    1920x1080
    Hard Drives
    2 x Samsung 870 EVO SSD
    Case
    Lenovo SFF
    Keyboard
    Cherry Stream TKL JK-8600US-2 Wired
    Mouse
    LogiTech M510 wireless
    Internet Speed
    Fast (for satellite!)
    Browser
    Chrome
    Antivirus
    Malwarebytes Premium & Defender (working together beautifully!)
  • Operating System
    11 Pro 22H2 1344
    Computer type
    PC/Desktop
    Manufacturer/Model
    Lenovo ThinkCentre M910S SFF
    CPU
    i7-7700 @ 3.60MHz
    Motherboard
    Lenovo
    Memory
    16GB DDR4 @ 2400MHz
    Graphics card(s)
    Intel HD 630 Graphics onboard
    Sound Card
    Realtek High Definition Audio onboard
    Monitor(s) Displays
    LG FULL HD (1920x1080@59Hz)
    Screen Resolution
    1920 x 1080
    Hard Drives
    2 x Samsung 870 EVO SSD
    Mouse
    LogiTech M510 wireless
    Keyboard
    Microsoft 600 wired
    Internet Speed
    Fast (for satellite!)
    Browser
    Chrome
    Antivirus
    Malwarebytes Premium and MS Defender

Latest Support Threads

Top Bottom