Skip to content

Instantly share code, notes, and snippets.

@renelink
Created October 29, 2023 17:20
Show Gist options
  • Save renelink/3cd595a2d5f60224bd77a65f93293785 to your computer and use it in GitHub Desktop.
Save renelink/3cd595a2d5f60224bd77a65f93293785 to your computer and use it in GitHub Desktop.
windows-defender-hyper-v-exclusions.ps1
# powershell -executionpolicy bypass -File .\windows-defender-hyper-v-exclusions.ps1
Add-MpPreference -ExclusionExtension ".vhd"
Add-MpPreference -ExclusionExtension ".vhdx"
Add-MpPreference -ExclusionExtension ".avhd"
Add-MpPreference -ExclusionExtension ".avhdx"
Add-MpPreference -ExclusionExtension ".vhds"
Add-MpPreference -ExclusionExtension ".vhdpmem"
Add-MpPreference -ExclusionExtension ".iso"
Add-MpPreference -ExclusionExtension ".rct"
Add-MpPreference -ExclusionExtension ".mrt"
Add-MpPreference -ExclusionExtension ".vsv"
Add-MpPreference -ExclusionExtension ".bin"
Add-MpPreference -ExclusionExtension ".xml"
Add-MpPreference -ExclusionExtension ".vmcx"
Add-MpPreference -ExclusionExtension ".vmrs"
Add-MpPreference -ExclusionExtension ".vmgs"
Add-MpPreference -ExclusionPath "%ProgramData%\Microsoft\Windows\Hyper-V"
Add-MpPreference -ExclusionPath "%Public%\Documents\Hyper-V\Virtual Hard Disks"
Add-MpPreference -ExclusionPath "%SystemDrive%\ProgramData\Microsoft\Windows\Hyper-V\Snapshots"
Add-MpPreference -ExclusionProcess "%systemroot%\System32\Vmms.exe"
Add-MpPreference -ExclusionProcess "%systemroot%\System32\Vmwp.exe"
Add-MpPreference -ExclusionProcess "%systemroot%\System32\Vmsp.exe"
Add-MpPreference -ExclusionProcess "%systemroot%\System32\Vmcompute.exe"
@renelink
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment