Introduction
Easit ProcessRunner, or EPR for short, makes it possible to integrate Easit GO with your existing PowerShell scripts. EPR consist of a java application running in an instance of Apache Tomcat, installed as a Windows service.
Once started, EPR listens for incoming request using a REST service. When a request is received, the JSON body of the request is passed on as a argument to a script file with the same name as the value of "importHandlerIdentifier" in the body. We also send a base64 representation of the JSON body via stdin.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
To put in to context, the command executed by the java application, with the example above would be as shows below.
1 |
|
To further exemplify this, our script scriptName.ps1 looks like this:
1 2 3 4 5 6 7 8 9 |
|
and will produce this output:
1 2 3 4 5 |
|
Once the script have completed, EPR will evaluate LASTEXITCODE. If LASTEXITCODE is anything else than 0 the java application will treat it as an error or failure.