Windows Defender, the built-in anti-virus program in Windows, has useful features such as cloud-based protection, offline scanning, limited periodic scanning, tamper protection, controlled folder access, etc.
Almost every aspect of Windows Defender can be managed or automated using the MpCmdrun.exe command-line tool and PowerShell cmdlets. There are times when you need to temporarily disable your Windows Defender real-time protection on your test (non-production) systems and switch it back on after a few minutes.
You may prefer a single-click shortcut or script solution because of the following reasons:
- It takes several mouse clicks to turn off/on the Windows Defender real-time protection through the user interface.
- The Turn off Microsoft Defender Antivirus Group Policy setting or its equivalent registry setting
DisableAntiSpyware = 1 would require rebooting the computer.
- Microsoft has discontinued the
DisableAntiSpyware policy/registry setting in Microsoft Defender Antimalware platform versions 4.18.2007.8 and higher. DisableAntiSpyware no longer works!
This post explains how to enable or disable Windows Defender in a single click using desktop shortcuts or command-line without requiring a restart.
Read more