What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Use vbscript with window credential return error

Votes:

0

Your Vote:

Up

Down

I use a vbscript custom sensor and set use Windows credentials of parent device but will return "Access denied. Please check your Windows credentials. (code: PE095)".

But other sensor use WMI not return any error

custom-sensor error vbscript

Created on Jul 14, 2016 5:28:17 AM by  a23554 (0) 2



9 Replies

Votes:

0

Your Vote:

Up

Down

Hello,

Could you please post the script that you are trying to run in this sensor?

If possible, please also upload some screenshots of the sensor.

Created on Jul 15, 2016 8:57:37 AM by  Isidora Jeremic [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello, This is my code

strComputer = ""

strUser = ""
strPassword = ""

strNamespace = "root/cimv2"

Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objLocator.ConnectServer(strComputer,strNamespace,strUser,strPassword)
Set colItems = objWMIService.ExecQuery("Select * from Win32_Process WHERE name ='svchost.exe'")


if colItems.Count < 3 then
  wscript.echo colItems.Count&":Ok"
  wscript.quit("0")
Else
  wscript.echo colItems.Count&":Too many processes"
  
  REM This sets the sensor into "Warning" State
  wscript.quit("1")
End if

is there need enter any parameter at parameters field

Created on Jul 15, 2016 9:31:57 AM by  a23554 (0) 2

Last change on Jul 18, 2016 2:17:21 AM by  a23554 (0) 2



Votes:

0

Your Vote:

Up

Down

Can you try to enter the computer, user and password in the script and check if it works out?

Created on Jul 15, 2016 1:20:54 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

yes, it can work.

Created on Jul 18, 2016 12:31:15 AM by  a23554 (0) 2

Last change on Jul 18, 2016 7:44:39 AM by  a23554 (0) 2



Votes:

0

Your Vote:

Up

Down

Hello, if I enter the computer, user and password in the script it returns this error "XML: The returned xml does not match the expected schema. (code: PE233) -- JSON: The returned json does not match the expected structure (Invalid JSON.). (code: PE231)", but if I use this code at localhost it no error, I don't know what wrong with it, can you help me?

Created on Jul 18, 2016 2:25:29 AM by  a23554 (0) 2



Votes:

0

Your Vote:

Up

Down

What sensor type are you using? EXE/XML or EXE/XML (advanced)?

Created on Jul 18, 2016 8:59:35 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I use EXE/XML sensor.

Created on Jul 19, 2016 12:39:18 AM by  a23554 (0) 2



Votes:

0

Your Vote:

Up

Down

Now, it have another error is "Response not wellformed: "(C:\Program Files (x86)\PRTG Network Monitor\custom sensors\EXE\Demo VBScript - Returns warning depending on number of svchost processes.vbs(9, 1) SWbemLocator: Access is denied. )" (code: PE132)" please help me

Created on Jul 19, 2016 1:30:21 AM by  a23554 (0) 2



Votes:

0

Your Vote:

Up

Down

I think the script is a rather lost cause - from what I can tell, you try to monitor the amount of svchost.exe instances. Couldn't you use the Windows process sensor for that? Is has a channel with the instance amount; simply apply limites to it and you can trigger notifications for that.

Created on Jul 19, 2016 7:49:18 AM by  Stephan Linke [Paessler Support]



Please log in or register to enter your reply.


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.