# PowerShell script to stop JBoss EAP 7.4 # Configuration $JBOSS_HOME = "C:\Dev2012\BUILDERS\jboss-eap-7.4" Write-Host "Stopping JBoss EAP 7.4..." -ForegroundColor Yellow # Find and stop JBoss process $jbossProcess = Get-Process -Name "java" -ErrorAction SilentlyContinue | Where-Object { $_.CommandLine -like "*jboss.home.dir=$JBOSS_HOME*" } if ($jbossProcess) { Write-Host "Found JBoss process (PID: $($jbossProcess.Id))" -ForegroundColor Yellow Stop-Process -Id $jbossProcess.Id -Force Write-Host "JBoss process stopped" -ForegroundColor Green } else { Write-Host "No JBoss process found running" -ForegroundColor Yellow } # Wait a moment to ensure process is fully stopped Start-Sleep -Seconds 2