Hello,

I have a powershell script following the example of the DEMO scripts supplied by PRTG. When run in Powershell, it works fine and returns "number :message".

However the sensor value returned is 0.

I have included the script:

$p = Get-WmiObject -class win32_process -computername server -filter "name='w3wp.exe'" | Where-Object { $_.CommandLine -match "matchLine" } | Select-Object workingSetSize

foreach ($o in $p) {
	
	write-host $o.workingSetSize,":OK"
}

Article Comments

Hello,

just to check, can you please try running the "PRTG Probe Service" under an (domain) admin account? Does this change the result?

best regards.


Jan, 2013 - Permalink