Skip to main content

Worklet: Set Windows Defender to do a Full Scan at Least Once a Week (or Never)

  • February 19, 2021
  • 0 replies
  • 87 views

Tony-Automox

This particular worklet looks for any system set to never run a full scan and changes it to run on Wednesdays. You could obviously alter it to look for a different condition and set it how you wish. For example…


You could look for systems not set to do a full scan every day in the evaluation and change it to do so…

Evaluation: if ($Preferences.RemediationScheduleDay -ne 0)

Remediation: Set-MpPreference -RemediationScheduleDay 0


Or conversely, if you want Defender to never do a full scan…

Evaluation: if ($Preferences.RemediationScheduleDay -ne 8)

Remediation: Set-MpPreference -RemediationScheduleDay 8


The acceptable values for this parameter are:



  • 0: Everyday

  • 1: Sunday

  • 2: Monday

  • 3: Tuesday

  • 4: Wednesday

  • 5: Thursday

  • 6: Friday

  • 7: Saturday

  • 8: Never


Evaluation:


# Determine if full Defender scans are set to never run

$Preferences = Get-MpPreference

if ($Preferences.RemediationScheduleDay -eq 8)

    { exit 1 }

else

    { exit 0 }


Remediation:


# Set a full Defender scan to run on Wednesdays

Set-MpPreference -RemediationScheduleDay 4

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