Multiple PowerShell outputs within Ivanti Automation

imageIvanti Automation (formally known as RES Automation) and PowerShell work very well together. By using PowerShell from within Ivanti Automation we are able to talk to any system that utilize a REST full API.

The Task for Powershell does only allow for all the screen output of a script to be placed in one Automation parameter. To divide this output into multiple parameters the data had to be splited in Automation or in Ivanti Identity Director.

image

Since the release of Ivanti Automation 2018.1 (current version is 2018.1.1) it is now possible to place the output of multiple PowerShell variables in to various Automation parameters.

To do this from within your script you have to declare your parameter the following way:

$global:ParameterName

Experienced PowerShell users will recognize this notation for a Global variable in Powershell. Importing thing to remember when using this the ParameterName is case sensitive so it has to match how it is used in Automation. When your ParameterName includes special characters or even spaces please read this post. Using special characters in PowerShell Variables

This code is just an example how you can use this feature, there many different use cases that could apply.

image

If I execute this code with Ivanti Automation I get the following output.

image


Tags: , , , ,

Leave a Reply