3 Replies Latest reply on Jan 9, 2015 9:11 AM by Leon Adato

    Can I run scripts on the local machine???

    walkerl

      I would like to know if we can run monitoring scripts on our solarwinds machines which will then go out an grab info from the remote machine versus the way it works now which is SW logs on, drops a script, executes and gets a result. I hope I worded this in a way that makes sense.

        • Re: Can I run scripts on the local machine???
          stripet

          walkerl

          To my knowledge, you cannot.

           

          I think the scripts and results always run on the SolarWinds Polling Server the node is using.

           

          Quote from OnLine help:

          "

          Creating a Windows Script Monitor

                  

          This component monitor runs a Windows script on the SolarWinds SAM server and then processes the script's exit code and text output. "

            • Re: Can I run scripts on the local machine???
              stripet

              walkerl
              One way you could do it is to run a VBScript which creates a Scheduled Task on the local node which runs a local script.  If you do it right the job only runs once and is done and the script it runs has to be local of course.  Let me know if you want to see a sample VBSCript which we use to run things locally on the nodes.

               

              Shawn

            • Re: Can I run scripts on the local machine???
              Leon Adato

              Just to clarify: VBScript runs local on the polling engine. In order to run VBScript commands on the target machine, you have to do what walkerl says - VBScript1 opens a connection to the target, writes/copies VBScript2 to the target's drive, creates a scheduled task to run that script, and then VBScript2 writes the results to a file. Finally, VBScript1 reads the file and echos the results to stdout for SAM to pick up.

               

              Powershell has an option to run local (to the polling engine) or remote (on the target)

               

              Perl and shell scripts run remotely (typically on Unix/Linux systems)

               

              Hope that helps.