Yes, there is. To do this:
- Add the Run a program or PowerShell script action to your rule, command or task.
- Specify the full path to your external script in the Script field, for example: C:\Scripts\MyScript.ps1.
Note however that if you are going to use your product for showing GUI from scripts executed by Business Rules, Custom Commands or Scheduled Tasks, you won't be able to see that GUI. Scripts run as a part of rules, commands or tasks are executed by Adaxes service. In Windows, GUI displayed by services is never shown to users.
As a workaround, for debugging purposes, you can use the $Context.LogMessage method that updates the Execution Log of an operation. The first parameter of the method is the text of the message you want to add; the second parameter is the type of the message. The second parameter can take the following values: "Information", "Warning", and "Error".
$Context.LogMessage("My message", "Information")