Hi,
I have an issue with my powershell sensor
$found=Get-Process -ComputerName "srv-bi-01" | WHERE {$_.ProcessName -eq "svchost"} Write-Host "<prtg>" Write-Host "<result>" "<channel>svchost UP</channel>" "<value>"+ @($found).Count +"</value>" "</result>" "<text></text>" Write-Host "</prtg>"
This count 0 (and its not true)
And when I remove -ComputerName "srv-bi-01" it count correctly (but on the wrong computer obviously)
When I test my script outside of PRTG it work fine
Add comment