Skip to content

Instantly share code, notes, and snippets.

@MrLuje
Last active March 6, 2024 15:06
Show Gist options
  • Save MrLuje/350cb86010a0f893570f1a694a9a8121 to your computer and use it in GitHub Desktop.
Save MrLuje/350cb86010a0f893570f1a694a9a8121 to your computer and use it in GitHub Desktop.
Script to exclude folders & processes from Windows Defender to be more developper-friendly
# Setup Windows Defender common exclusion
Write-Host "Excluding paths..."
Add-MpPreference -ExclusionPath "$env:appdata\npm"
Add-MpPreference -ExclusionPath "$env:appdata\nvm"
# These folders contains most of my repo, you may want to change it to your owns
Add-MpPreference -ExclusionPath "C:\Temp"
Add-MpPreference -ExclusionPath "C:\Vincent"
Write-Host "Excluding processes..."
(
"bash.exe",
"cmd.exe",
"conhost.exe",
"code.exe",
"com.docker.service",
"docker-compose.exe",
"docker.exe",
"dockerd.exe",
"dep.exe",
"go.exe",
"devenv.exe",
"ServiceHub.Host.CLR.x86.exe",
"ServiceHub.Host.Node.x86.exe",
"ServiceHub.IdentityHost.exe",
"ServiceHub.RoslynCodeAnalysisService32.exe",
"ServiceHub.SettingsHost.exe",
"ServiceHub.VSDetouredHost.exe",
"fsautocomplete.exe",
"paket.exe",
"node.exe",
"qemu-system-i386.exe",
"java.exe",
"studio64.exe"
) | ForEach-Object {Add-MpPreference -ExclusionProcess $_}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment