Write-Host "`n=== SEARCHING 4 MESH AGENT ===" -ForegroundColor Cyan
$names = @(
"meshagent.exe",
"meshagent",
"MeshCentralAgent",
"Mesh Agent",
"meshcentral"
)
$roots = @(
"$env:ProgramFiles",
"${env:ProgramFiles(x86)}",
"$env:ProgramData"
)
foreach ($root in $roots) {
if (Test-Path $root) {
foreach ($name in $names) {
Get-ChildItem -Path $root -Recurse -Force -ErrorAction SilentlyContinue -Filter $name |
Select-Object FullName, Length, LastWriteTime
}
}
}
Write-Host "`n=== WINDOWS SERVICES ===" -ForegroundColor Cyan
Get-CimInstance Win32_Service |
Where-Object {
$_.Name -match '(?i)meshagent|meshcentral' -or
$_.DisplayName -match '(?i)mesh agent|meshcentral' -or
$_.PathName -match '(?i)meshagent|meshcentral'
} |
Select-Object State, Name, DisplayName, PathName
Write-Host "`n=== PROCESSES ===" -ForegroundColor Cyan
Get-Process -ErrorAction SilentlyContinue |
Where-Object {
$_.ProcessName -match '(?i)^meshagent$|^meshcentral'
} |
Select-Object Id, ProcessName, Path
Write-Host "`n=== DONE ===" -ForegroundColor Green