What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Custom sensor powershell returns 0#

Votes:

0

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"
}

custom-sensor powershell prtg

Created on Jan 4, 2013 11:45:28 PM

Last change on Jan 7, 2013 1:23:43 PM by  Torsten Lindner [Paessler Support]



1 Reply

Votes:

0

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.

Created on Jan 7, 2013 1:29:34 PM by  Torsten Lindner [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.