<#
.SYNOPSIS
  AgentsMeeting Windows Services â€?åœæ­¢æ‰€æœ‰æœåŠ?#>

Write-Host "Stopping all AgentsMeeting services..." -ForegroundColor Yellow

$count = 0
Get-Process -Name "python*" -ErrorAction SilentlyContinue | ForEach-Object {
    $cmd = (Get-CimInstance Win32_Process -Filter "ProcessId=$($_.Id)").CommandLine
    if ($cmd -match "xmpp_bot|wechat_agent|api_proxy|watchdog|health_check") {
        Write-Host "  Killing PID $($_.Id)" -ForegroundColor Gray
        Stop-Process -Id $_.Id -Force -ErrorAction SilentlyContinue
        $count++
    }
}

Write-Host "Stopped $count processes." -ForegroundColor Green
