New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

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

Free PRTG
Download >>

 

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

 

Top Tags


View all Tags


Running SQL Query from Within Powershell EXEXML Sensor

Votes:

0

Your Vote:

Up

Down

Im trying to run a SQL script from within a powershell script sensor. But i need to feed the SQL credentials from PRTG into the EXEML Powershell script.... is this possible?

Basically,.. is there any way to access the PRTG credential store from within a powershell script?

Why would i do this? Because i'd like to return different results in different cases, write some stuff to logging etc, which i cant do with plain TSQL.

microsoftsql powershell prtg

Created on Jan 19, 2017 2:57:02 PM by  trunq (10) 1



2 Replies

Accepted Answer

Votes:

0

Your Vote:

Up

Down

Hello trung,

Thank you very much for your KB-post.

Actually it is not possible to use the SQL credentials which are set in the device-settings of PRTG.
The only suitable way to enter the credentials in PRTG (for the usage in an external script) is by using the Parameters field in the sensor settings.
Kindly be aware to use the right syntax for these parameter. Please see a short example: -host "server1" -user "admin" -password "MyLittleSecret" -param "abc123" For details, please refer to the manual page of the EXE/Script Sensor.

Best regards,
Sven

Created on Jan 20, 2017 9:18:55 AM by  Sven Roggenhofer [Paessler Technical Support]



Votes:

0

Your Vote:

Up

Down

ok great many thanks Sven!

Created on Jan 20, 2017 10:05:32 AM by  trunq (10) 1



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.