Skip to content

Instantly share code, notes, and snippets.

@imeredith
Created December 13, 2018 01:10
Show Gist options
  • Save imeredith/0dfa6faa8ed2d06c2857f2729b66bca1 to your computer and use it in GitHub Desktop.
Save imeredith/0dfa6faa8ed2d06c2857f2729b66bca1 to your computer and use it in GitHub Desktop.
$win_user = "ivan"
$linux_user = "ivan"
$package = "CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc"
$base_path = "C:\Users\" + $win_user + "\AppData\Local\Packages\" + $package + "\LocalState\rootfs"
$dirs = @("\usr\local\sbin", "\usr\local\bin", "\usr\sbin", "\usr\bin", "\sbin", "\bin", "\usr\games", "\usr\local\games")
$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