We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95ab2fa commit adf978aCopy full SHA for adf978a
eng/scripts/KillProcesses.ps1
@@ -10,6 +10,18 @@ function _kill($processName) {
10
}
11
12
13
+function _killJavaInstances() {
14
+ $_javaProcesses = Get-Process java -ErrorAction SilentlyContinue |
15
+ Where-Object { $_.Path -like "$env:JAVA_HOME*" };
16
+ foreach($_javaProcess in $_javaProcesses) {
17
+ try {
18
+ Stop-Process $proc
19
+ } catch {
20
+ Write-Host "Failed to kill java process: $proc"
21
+ }
22
23
+}
24
+
25
_kill dotnet.exe
26
_kill testhost.exe
27
_kill iisexpress.exe
@@ -22,6 +34,8 @@ _kill vctip.exe
34
_kill chrome.exe
35
_kill h2spec.exe
36
_kill WerFault.exe
37
+_killJavaInstances
38
39
if (Get-Command iisreset -ErrorAction ignore) {
40
iisreset /restart
41
0 commit comments