# Kill fs-company Java processes (keep fs-admin PID 2712)
$javaProcs = Get-Process -Name java -ErrorAction SilentlyContinue
foreach ($proc in $javaProcs) {
    $procId = $proc.Id
    $cmd = (Get-CimInstance Win32_Process -Filter "ProcessId=$procId").CommandLine
    if ($cmd -match "fs-company") {
        Write-Output "Killing fs-company PID $procId"
        Stop-Process -Id $procId -Force
    } elseif ($cmd -match "fs-admin") {
        Write-Output "Keeping fs-admin PID $procId"
    } else {
        Write-Output "Other Java PID $procId (JDT/other) - keeping"
    }
}
