Skip to content

Instantly share code, notes, and snippets.

@syaifulnizamyahya
Created March 24, 2018 13:56
Show Gist options
  • Select an option

  • Save syaifulnizamyahya/7047c163f31e8310d4770bacdf22bad7 to your computer and use it in GitHub Desktop.

Select an option

Save syaifulnizamyahya/7047c163f31e8310d4770bacdf22bad7 to your computer and use it in GitHub Desktop.
Prevent Windows Defender from deleting/quarantining files
Edit Windows Defender setting to prevent deleting unharmful files
From Admin Powershell
Turn off Automatic Remediation:
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableRoutinelyTakingAction /t REG_DWORD /d 1 /f
Turn on Automatic Remediation:
REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableRoutinelyTakingAction /f
Specifies the number of days to keep items in the Quarantine folder.
Set-MpPreference -QuarantinePurgeItemsAfterDelay 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment