7

Unfortunately sometimes it is needed to disable (and later enable again) the (excellent) Windows defender real time protection.

I require 7 clicks to enable or disable Defender real time protection: Systray -> double on icon -> "Virus & threat protection" -> "Virus & threat protection settings" -> Toggle "Real-time protection" -> User Account Control "Yes".

Is there a simpler way to create a desktop shortcut that minimizes the number of clicks needed?

Run5k
  • 16,463
  • 24
  • 53
  • 67
janpio
  • 2,856

3 Answers3

3

It seems you can do this in powershell:

Set-MpPreference -DisableRealtimeMonitoring $true

Obviously, set it to $false to turn it back on.

This answer on StackExchange discusses how to turn this into a shortcut if that's how you choose to proceed.

djsmiley2kStaysInside
  • 6,943
  • 2
  • 36
  • 48
2

To actually toggle the real-time monitoring state put the following in a PowerShell script (must be run as administrator):

$preferences = Get-MpPreference
Set-MpPreference -DisableRealtimeMonitoring (!$preferences.DisableRealtimeMonitoring)

To make this into a desktop shortcut, right-click on the Desktop, choose "New" and then "Shortcut" and enter the following for the item (substituting the location of the script you created for the -File argument)

%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\Users\yuji\Documents\toggle-monitoring.ps1"

And in the Advanced options, enable Run as administrator.

janpio
  • 2,856
yuji
  • 135
0

Just use Local Group Policy Editor to nerf it bad...

I'm so tired of that resource hog that I've made it nice little pet now. and it only scnan anything I ask it to. Like if I download something and I'm not 100% sure about it. I just right click and scan the zip or folder or file with Windows defender. and it will tell me if it's iffi or not.

Windows HAVE begun trying to get back their little spy tool. and are now reporting my policy edits as malware or virus. lol. but they don't do anything. just report it and let me click approve on it. and I can keep my little pet in leech.

You can just as easily enable it again by removing the policies