Running Powershell scripts with GoAnywhere

Post any question you may have in regards to GoAnywhere MFT and let our talented support staff and other users assist you.
If you need a quicker response, please create a support ticket via the customer portal or contact our support team by email at [email protected].
2 posts Page 1 of 1


Posts: 1
Joined: Mon May 13, 2019 7:23 pm

Post by SoucyMi » Tue May 14, 2019 3:29 pm
Is it possible to run a Windows PowerShell script with GoAnywhere (IBM i version)? If so, can you please provide an example?


User avatar
Posts: 8
Joined: Mon May 21, 2018 10:54 am

Post by Support_Nolan » Tue May 21, 2019 11:42 am
In GoAnywhere, you can use the Execute Native Command/ Execute IBM I Command or Program task to run a Powershell Script.
This means you would have to have the powershell script on your GA machine.

Since your GA is on IBM, you would not be able to run the powershell script unless you could also run it natively.
GoAnywhere cannot call a script that is sitting on a different server, unless you were calling it through something like a GoAnywhere Agent.

Execute IBM i Command or Program Task
IBM i (iSeries) commands and programs can be executed through an IBM i Server Resource. When calling programs on the IBM i, up to 35 parameters can be used to pass variables and constant values to the program. Parameters can be returned from the called programs as Variables, which can be used within subsequent tasks within a Project.
Example 1: Calling a Program
Follow the steps below to call a program on an IBM i. This example program will pass in the current date as a parameter and return a new date that will be stored in an Output Variable. That variable can then be used in subsequent tasks:
1. From within the Project Designer page, navigate to the Integration folder in the Component Library, and then drag the Execute IBM i Command or Program task to the Project Outline.
2. On Execute IBM i Command or Programs task, specify the IBM i Server value:
o IBM i Server - A pre-configured IBM i Server Resource from the drop down list. If a resource does not exist click the Create button to add a new one.

3. Click the Add button in the sub-menu and choose the Add Program menu item.
4. On the IBM i Program element, specify values for the following attributes:
o Program Name - The name of the program to call.
o Program Library - The program's library.

5. Click the Add button in the sub-menu and choose the Add Parameter menu item.
6. On the Program Parameter element, specify values for the following attributes:
o Input Value - The input value of the parameter.
o Length - The total length of this parameter.
o Output Variable - The name of a variable which will contain the value of this output parameter. The variable may be used in subsequent tasks. Please note that if the usage for this parameter is set to 'IN', this variable will not be updated or created.

7. Click the Save button when finished.
The following image illustrates the Project Outline for the Execute IBM I Command or Programs task example:

Nolan Priebe
Support Analyst
e. [email protected]
p. 1-800-949-4696
w. |
2 posts Page 1 of 1