Update networking.bat for store WSL (#8132)
Blue committed
Mar 28, 2022 at 20:12 UTC
227f11dbab1292b669c638c72dce65723b3bea62
1 file changed
+5
-1
diagnostics/networking.bat
+5
-1
@@ -8,6 +8,10 @@ net session >nul 2>&1 || goto :admin
8
if not exist wsl_networking.wprp (echo wsl_networking.wprp not found && exit /b 1)
9
if not exist networking.sh (echo networking.sh not found && exit /b 1)
10
11
+:: Capture the store WSL version
12
+echo "WSL version (Might be help text if store WSL is not installed):"
13
+wsl.exe --version
14
+
15
:: List installed Windows features.
16
echo Windows features:
17
powershell.exe -NoProfile "Get-WindowsOptionalFeature -Online | ? State -eq Enabled | select FeatureName"
@@ -25,7 +29,7 @@ echo Deleting HNS network
29
powershell.exe -NoProfile "Get-HnsNetwork | Where-Object {$_.Name -eq 'WSL'} | Remove-HnsNetwork"
30
31
:: Stop WSL.
28
-net.exe stop LxssManager
32
+net.exe stop WslService || net.exe stop LxssManager
33
34
:: Start packet capture.
35
powershell.exe -NoProfile "New-NetEventSession HnsPacketCapture -CaptureMode SaveToFile -LocalFilePath %cd%\\packets.etl" || goto :fail