Way to turn off Default windows antivirus completely using Cmd?

  antivirus, batch-file, cmd, powershell, windows

I need a batch script to turn of default windows defender because I have a separate antivirus.

Windows keeps turning its own antivirus on every like 5 seconds and its annoying for excluded files on my main antivirus.

  • Expected results: Turn off default antivirus solution
  • Actual results: Nothing

(Using a VM)

  1. I have tried Using powershell to turn of scanning
  2. Using reg on DWORD "DisableAntispyware"
  3. All sorts of other things on the internet

(As admin)


REG ADD HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindows Defender /v DisableAntispyware /t REG_DWORD /d 1 /f


Set-MpPreference -DisableRealtimeMonitoring $true

Source: Windows Questions