Skip to content

Instantly share code, notes, and snippets.

@phil-scott-78
Created February 20, 2022 20:48
Show Gist options
  • Save phil-scott-78/72446b8f031aaf4a79a55667e3c8f1b4 to your computer and use it in GitHub Desktop.
Save phil-scott-78/72446b8f031aaf4a79a55667e3c8f1b4 to your computer and use it in GitHub Desktop.
Write-Output "Cleaning exclusion paths"
$Paths=(Get-MpPreference).ExclusionPath
foreach ($Path in $Paths) { Remove-MpPreference -ExclusionPath $Path }
Write-Output "Cleaning exclusion extensions"
$Extensions=(Get-MpPreference).ExclusionExtension
foreach ($Extension in $Extensions) { Remove-MpPreference -ExclusionExtension $Extension }
Write-Output "Cleaning exclusion processes"
$Processes=(Get-MpPreference).ExclusionProcess
foreach ($Process in $Processes) { Remove-MpPreference -ExclusionProcess $Process }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment