13

I wish to disable Windows Defender on Windows 10 Pro, and I know I have to enable the policy Turn off Windows Defender Antivirus via:

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

This didn't work; Windows Defender, and it's modules, remained active.

  • I tried disabling it via the Registry, adding the following key with a value of 1, but received Error while renaming:
    HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\DisableAntiSpyware
    
    I restarted my PC several times, turned it off, unplugged it, all to no avail.

Has Microsoft changed something in the latest release that prevents users from turning Windows Defender off?

10 Answers 10

7

I found the solution. It turns out that Windows Defender is so ingrained within Windows 10 that it comes with its own "anti-tamper" protection.

This does two things: prevents you from creating the registry key in HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender by giving you a generic error message and also renders the group policy change ineffective.

In order to disable this, I had to follow these instructions:

  1. Go to Virus & threat protection
  2. Click on Manage Settings
  3. Turn off Tamper Protection
  4. Proceed to enable the group policy Turn off Windows Defender Antivirus in Computer Configuration/Administrative Templates/Windows Components/Windows Defender Antivirus or add the registry key.
  5. Restart PC
1
  • Note: Some versions of W10 do not have group policy editor, in this case you will have to edit the registry manually.
    – Moab
    Nov 10, 2019 at 13:57
5

In Windows 10 21H1 switching Tampering protection off in Security Center widget and then setting Turn off Microsoft Defender Antivirus policy in gpedit.msc results in:

  • Registry setting for this policy DisableAntiSpyware=dword:00000001disappears immediately. Despite that:
  • Virus protection does switch off;
  • Switching virus protection off retains after rebooting;
  • Microsoft Defender's services still run and protect their registry settings so you cannot edit them;
  • To switch virus protection back on use Windows Security widget.

So this method switches off virus protection but not Defender's services.

Another way to switch off Microsoft Defender with different results:

  1. Disable Windows Security Center (wscsvc) service using registry editor : set "Start" to 4. It is impossible (I didn't manage) to change this value via Services snap-in, "sc" utility etc.
  2. Reboot.
  3. Run gpedit.msc and set Turn off Microsoft Defender Antivirus policy setting to "On". After few seconds Microsoft Defender Antivirus (WinDefend) service start value automatically changes from 2(auto) to 3(manual).
  • Now magically I can edit Microsoft Defender's registry values, protected before disabling Security Center. For example it is now possible to set WinDefend service "Start" value to 4(disabled) as well as other Defender's services e.g. Windows Defender Advanced Threat Protection Service (Sense) etc;
  • Turn off Microsoft Defender Antivirus policy and it's registry value retain;
  • If I set Security Center service "Start" value back to 2(automatic) and reboot, Turn off Microsoft Defender Antivirus policy setting and it's registry value retain also;
  • I cannot switch virus protection back on in Windows Security widget: virus protection settings are now inaccessible. Instead I see that "Your antivirus protection settings are managed by your organization". So policy does work!
  • To return all virus protection settings back I must go to gpedit.msc and set Turn off Microsoft Defender Antivirus policy back to "Unconfigured". After some short time registry "Start" value of Microsoft Defender Antivirus (WinDefend) service automatically changes to 2(auto). Then this service starts. Access to virus protection settings in Windows Security widget returns. Registry settings of Defender's services become protected and uneditable again.

This Microsoft article says that Turn off Microsoft Defender Antivirus policy (DisableAntiSpyware=dword:00000001) since recently works only on servers, not on clients. But in fact it works on clients but in pretty sophisticated way:)

1
  • Only method that worked for me on 21H2. Service keys are in HKLM\SYSTEM\CurrentControlSet\Services.
    – vctls
    May 20, 2022 at 14:22
3

Update: After a reboot, realtime protection came back on... So this answer does not work for me. But since it proposes a new method (the registry edit) I'm leaving it here. It could help someone else. Different people seem to have success with different methods.

I also find that updating to 21H1 does not help.


For me, it was very difficult to disable Windows Defender in Windows 10 2004 (20H2). I had disabled tamper protection, but still the group policy setting kept being deleted instantly. To see this, one must restart the group policy editor. Also, realtime protection kept being turned on rather quickly when I disabled it.

I was able to overcome this with this registry setting: https://www.tenforums.com/tutorials/5918-how-turn-off-microsoft-defender-antivirus-windows-10-a.html (Search for "Turn_Off_Windows_Defender_Antivirus.reg").

This makes these changes:

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

So it works like this:

  1. Disable off tamper protection using the settings panel
  2. Also disable realtime protection
  3. Apply the registry change
  4. Open group policy editor
  5. Go to Computer Configuration\Administrative Templates\Windows Components\Microsoft Defender Antivirus and set `Turn off Microsoft Defender Antivirus" to Enabled (not sure if this is required now)

Another option to try is booting into safe mode in order to make the changes: https://www.alitajran.com/turn-off-windows-defender-in-windows-10-permanently/

3
  • 1
    From my observations, Enterprise or Education editions of Win10/11 can successfully disable the "Turn off Windows Defender" option in gpedit. In Pro, this setting never seems to stick and is reset after reboot.
    – Ray
    Oct 11, 2021 at 22:06
  • Microsoft has removed the Group Policy Editor from newer versions of Windows. Nov 25, 2021 at 21:47
  • The Group Policy editor has not been removed, but the DisableAntiSpyware value has been deprecated.
    – asheroto
    Sep 10, 2023 at 9:31
2

Another method. Go to Settings, Security, Virus & threat protection, Manage settings, Tamper protection. Set to Off. Then add this:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection]
"DisableRealtimeMonitoring"=dword:00000001

Tested with Windows 10 version 1909

4
  • I think it must be a problem with Windows 10 2004 then. I even renamed Windows Defender's folder using a live CD, still it worked just fine. Later I found out windows has, under the SysWOW64 dir, a bunch of tasks that will reactivate every defender server each reboot, regardless of whether I disable if via gpedit, registry or the switches in the windows defender menu. I've done all that with the anti-tamper disabled, to no effect. Ultimately, there's no way to disable it in Windows 10 2004 Aug 21, 2020 at 16:00
  • My solution to the problem ended up being to boot into a live CD again and rename all Windows defender folders under C:/Windows/winsxs AS WELL as the folder under C:/Program Files/, that effectively disable it but still I get warnings telling me to enable it again. Aug 21, 2020 at 16:02
  • @EzequielBarbosa I would post a new issue naming 2004 specifically - hopefully someone can address the issue
    – Zombo
    Aug 21, 2020 at 16:10
  • It's a good idea but I'm not doing it, I don't have much time and I solved the issue anyways, so. Aug 21, 2020 at 16:31
2

Update March 2022:

  • Now the Group Policy method does not work on its own anymore. As soon as you set Turn off Microsoft Defender Antivirus, it turns back on when you restart gpedit.
  • However, there is a way to make the change permanent!
  • Go to Task Manager -> Performance tab and then open the Open Resource Monitor link on the bottom of the page.
  • In the ResMon right-click and suspend MsMpEng.exe and MsMpEngCP.exe
  • The go back to the Group Policy editor and do the disabling again.
    • Computer Configuration -> Administrative Templates -> Windows Components -> Microsoft Defender Antivirus and Enable the Turn off Microsoft Defender Antivirus.
  • Voila! Now the change is persistent.
  • Reboot and enjoy the speed 🏁
1

i have succeeded in removing completely the "Windows Defender" and this solution survive reboots,

the method is fairly easy, but the implementation is a bit tedious,

you need to "destroy" the app executables, in order to keep a rollback option i have only renamed them (and not deleted them),

in order to do that i have boot into safe mode,

for every folder i took ownership on it (right click the folder -> properties -> security tab -> Advanced -> Change (next to the Owner label) and select your user, click apply to all subfolders and files, then add full access to your user)

now you can renamed these folders (i added a 111 prefix to all of them so they will appear at the top of the file list if i need them all in one place for rollback):

C:\Program Files\Windows Defender
C:\Program Files (x86)\Windows Defender

and renamed allot of folders and files inside:

C:\ProgramData\Microsoft\Windows Defender

because even safe mode did not allow me to rename the folder and several files inside it (since the service is active), so i renamed allot of them (especially dll, exe and bin files so the service wont have enough to work with in the next boot), and then i rebooted into safe mode again, that time the defender did not work anymore and i was able to rename the folder:

C:\ProgramData\Microsoft\Windows Defender

that's it, reboot again into normal mode and you will no longer see the Windows Defender in the Windows Security Center

No Defender anymore

0

As of Windows 10 version 2004, the group policy location has moved:

  1. turn off tamper protection through defender settings in Windows Settings
  2. Open group policy editor
  3. Navigate to Computer Configuration\Administrative Templates\Windows Components\Microsoft Defender Antivirus
  4. Turn off defender antivirus

Should work. Note it's now named Microsoft Defender Antivirus rather than Windows Defender now.

0

USING Group Policy Editor

So, before making any changes to the policy, head over to Task Manager, then to Performance Monitor from the Performance tab. Find MsMpEng.exe in any of the tabs in it (mostly on top in Memory or CPU tabs) and click on Suspend Process.

Then make the changes as required in the Group Policy Editor. It won't get reverted back.

NOTE :- Keep the MsMpEng.exe suspended for as long as you like XD

0

So, it turns out there's a bug (feature) in the latest Windows 10 21H1 with respect to Windows Defender.

To disable Windows Defender until you manually re-enable it, you need to adjust the group policy TWICE. You don't need to do the regedit but you may still need to disable 'Tamper protection' first.

That's right! Go to Computer Configuration - Administrative Templates - Windows Components - Microsoft Defender Antivirus - and 'Enable' the "Turn off Microsoft Defender Antivirus".

Then Reboot.

Then go through the above steps AGAIN.

After the second reboot, you'll see the system is 'checking' the Defender status but it eventually becomes a red 'X' and you'll see that the service isn't running.

Don't go by the little systray icon being green. It defaults to green but will eventually go to red.

Hope this helps!

2
  • Didn't work for me. MsMpEng.exe is still there, overwhelming my hard drive with I/O. Nov 26, 2021 at 5:30
  • I can cinfirm that this does indeed work (going through GP and disabling it twice) in the latest Windows 10 Enterprise 22H2. For those where it's not working, make sure you disable the 'tamper protection' function first. Dec 2, 2022 at 17:19
0
  1. Create local administrator user if yours it not. (It is needed to be able to login in safe mode. Microsoft account is not working without network and if you use pin to login)
  2. Create "disable antivirus.reg" with content below
  3. Run msconfig, go to boot tab, make it boot into safe mode
  4. Run "disable antivirus.reg". It disables Windows Defender services.
  5. Run msconfig and remove safe mode, reboot

disable antivirus.reg:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Sense]
"Start"=dword:00000004

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WdNisDrv]
"Start"=dword:00000004

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WdNisSvc]
"Start"=dword:00000004

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WdBoot]
"Start"=dword:00000004

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinDefend]
"Start"=dword:00000004

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WdFilter]
"Start"=dword:00000004

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection]
"AllowTelemetry"=dword:00000000

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

If you stuck in safe mode not being able to login, press reboot, holding "shift", boot into safe mode and run command prompt, run command: bcdedit /deletevalue {default} safeboot then reboot

Bitlocker recovery key can be obtained here https://account.microsoft.com/devices/recoverykey

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .