Created
May 10, 2023 07:06
-
-
Save scruel/0e3d85ead5eb33cd0c98c2e817d793ed to your computer and use it in GitHub Desktop.
Restart all related wsl processes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
%1 start "" mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c pushd ""%~dp0"" && ""%~s0"" ::","","runas",1)(window.close)&&exit | |
taskkill -IM "wslservice.exe" /F >nul 2>nul | |
taskkill -IM "wslhost.exe" /F >nul 2>nul | |
taskkill -IM "wsl.exe" /F >nul 2>nul | |
powershell.exe -WindowStyle Hidden -c "wsl" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment