1 Reply Latest reply on Nov 27, 2019 8:35 AM by Philippe Plomteux

    Running a Powershell Script from cell Rule

    Stefan Telley
      Share This:

      Hello Everybody,

       

      I've created a Powershell script to sent EventData back to another System. Therefore I've wrote a Powershell script.

       

      I've also created the rule for it to run. The call of the rule and the excution seems to work, but I get always an error back:

       

      20191127 143431.471000 mcell: SYSTEM: procs.c, 459: BMC_TS-IMC012004E: Cannot spawn program D:/BMC Software/TSIMAgent/Agent/server/etc/emvbs/kb/bin/w/<script>.ps1

      20191127 143431.471000 mcell: COMMAND: action.c, 726: BMC_TS-IMC101050E: Could not launch action program D:/BMC Software/TSIMAgent/Agent/server/etc/emvbs/kb/bin/w/<script>.ps1

       

       

      execute <rulename> :

      ZENOSS ($EV)

      when $EV.status: equals CLOSED

           {

                 # Update  Event if Status = Close

                 execute($EV, "<script>.ps1", [evid,$EV.zenoss_event_id,method,"close",message,"The Event has been closed on Truesight"], NO);

            }

      END

       

      IF I run the script manually i have to do it like this:

      1. Open Powershell

      2. Run the command:    .\<script> -evid event-id -method  "write_log" -message "This is the message"

       

       

      Any suggestions what is going on here?

       

      Thanks Yours Stefan