Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @ian-p-cooke ian-p-cooke revised this gist Jul 25, 2018. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions add_wsl_exclusions.ps1
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    $user = "ipc"
    $win_user = "ipc"
    $linux_user = "ipc"
    $package = "CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc"
    $base_path = "C:\Users\" + $user + "\AppData\Local\Packages\" + $package + "\LocalState\rootfs"
    $dirs = @("\bin", "\sbin", "\usr\bin", "\usr\sbin", "\home\ipc\.cargo\bin")
    $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
  2. @ian-p-cooke ian-p-cooke revised this gist Jul 25, 2018. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion add_wsl_exclusions.ps1
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    $base_path = "C:\Users\ipc\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\rootfs"
    $user = "ipc"
    $package = "CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc"
    $base_path = "C:\Users\" + $user + "\AppData\Local\Packages\" + $package + "\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
  3. @ian-p-cooke ian-p-cooke created this gist Jul 25, 2018.
    4 changes: 4 additions & 0 deletions add_wsl_exclusions.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    $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