Migrate scripts from ProcessRunner 1.x to 2.x
This article will help you migrate your scripts from 1.x to 2.x of Easit ProcessRunner.
Introduction
When executing the PowerShell script, EPR did this by adding the exported request from Easit GO as a JSON-string and appending it as an argument to the cmdLine runner. This would look something similar to this if running a script from the console.
1 |
|
In addition to the requestbody being sent as an argument, a base64 encoded string of the requestbody was sent via the stdin stream.
Scripts before 2.x
As a part of the "Best practices" guide, the following was recommended to add to all scripts.
1 2 3 4 5 6 7 |
|
And to access the exported item from Easit GO we recommended the following approach.
1 2 3 4 5 6 7 |
|
OR you could have used this approach
1 2 3 4 5 6 7 |
|
Scripts from 2.x and forward
We removed appending the exported request as an argument to the cmdLine runner and instead ONLY pass on the request body through the stdin stream. This change is a breaking change and for your scripts work you will need to update the parameter block to look like this.
1 2 3 4 5 |
|
You can still use the Convert-EasitGOExportString command to access exported item but you cannot use the $Base64StringFromStdIn | ConvertFrom-Json approach. Instead you could use this.
1 2 3 4 5 6 7 |
|