Skip to content

Instantly share code, notes, and snippets.

@ian-p-cooke
Last active November 12, 2022 05:02
Show Gist options
  • Star 45 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save ian-p-cooke/4e1713729b3676d2a5eaaf96b99978da to your computer and use it in GitHub Desktop.
Save ian-p-cooke/4e1713729b3676d2a5eaaf96b99978da to your computer and use it in GitHub Desktop.
powershell script to add WSL exclusions
$win_user = "ipc"
$linux_user = "ipc"
$package = "CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc"
$base_path = "C:\Users\" + $win_user + "\AppData\Local\Packages\" + $package + "\LocalState\rootfs"
$dirs = @("\bin", "\sbin", "\usr\bin", "\usr\sbin", "\home\" + $linux_user + "\.cargo\bin")
$dirs | ForEach { Add-MpPreference -ExclusionProcess ($base_path + $_ + "\*") }
Add-MpPreference -ExclusionPath $base_path
@cbdj
Copy link

cbdj commented Jan 30, 2019

Does this resolve the IO performance issue (microsoft/WSL#873) on WSL ?

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