Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tiancheng91/b659cca99b90fef0fdad024a27d1e4b3 to your computer and use it in GitHub Desktop.
Save tiancheng91/b659cca99b90fef0fdad024a27d1e4b3 to your computer and use it in GitHub Desktop.
powershell script to add WSL exclusions
$base_path = "C:\Users\ipc\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\rootfs"
$dirs = @("\bin", "\sbin", "\usr\bin", "\usr\sbin", "\home\ipc\.cargo\bin")
$dirs | ForEach { Add-MpPreference -ExclusionProcess ($base_path + $_ + "\*") }
Add-MpPreference -ExclusionPath $base_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment