Last active
June 23, 2020 17:12
-
-
Save KillerGoldFisch/9512a1f17168ad0afa0de2e28a52c5bf to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
pwsh "%~dp0\Kill-ShaderTools.LanguageServer.ps1" %* | |
exit /b 0 |
This file contains hidden or 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
function Kill-Tree { | |
Param([int]$ppid) | |
Get-CimInstance Win32_Process | Where-Object { $_.ParentProcessId -eq $ppid } | ForEach-Object { Kill-Tree $_.ProcessId } | |
Stop-Process -Id $ppid | |
} | |
Get-Process ShaderTools.LanguageServer | ForEach-Object { | |
Write-Host $_.Id | |
Kill-Tree $_.Id | |
} | |
Write-Host "Done" | |
Start-Sleep -Seconds 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment