Skip to main content

Worklet: Enable or disable Windows Defender

  • October 11, 2019
  • 0 replies
  • 103 views

JasonG-Automox

This will disable or enable Windows Defender as easily as uncommenting the correct command and commenting out the opposite.


• Under Evaluation Code:


If (Test-Path "$env:allusersprofile\SoftwareDistribution")

{

Exit 0



}

Else {

Exit 1

}


• Under Remediation Code:


#To disable real-time monitoring of Windows Defender, run the following command:



Set-MpPreference -DisableRealtimeMonitoring $true



#To enable real-time monitoring, comment out the $true statement above then uncomment and run the following command:



#Set-MpPreference -DisableRealtimeMonitoring $false

0 replies

Be the first to reply!

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings