Skip to content

Instantly share code, notes, and snippets.

@KillerGoldFisch
Last active June 23, 2020 17:12
Show Gist options
  • Save KillerGoldFisch/9512a1f17168ad0afa0de2e28a52c5bf to your computer and use it in GitHub Desktop.
Save KillerGoldFisch/9512a1f17168ad0afa0de2e28a52c5bf to your computer and use it in GitHub Desktop.
@echo off
pwsh "%~dp0\Kill-ShaderTools.LanguageServer.ps1" %*
exit /b 0
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