Hi Pankaj,
What I have been doing since upgrading to CAPA 4.3.2 is using the REST API to read the DataSet variables from the job and converting it into a PowerShell Object.
This allows me to pass all kinds of complex variable types (except passwords) to PowerShell and not having to worry about fancy parsing.
I have attached a sample version of the PowerShell code that I use, the only parameters you need to pass to the script are as follows:
[string]$CAPA_Username Username of account that has access to the process
[string]$CAPA_Password Password of account that has access to the process
[string]$CAPA_ServerName Base URL of the CAPA Server (i.e. capa-automation-dev.***.***:8443)
[string]$CAPA_InstanceID Instance ID of the job that you want to retrieve the data for
The script will convert the results of the REST API call to an object, when you want to retrieve a variable from the object you just call the function and pass the CAPA variable name.
i.e. ReturnDataSetVariable "Environment.SCOM.Preproduction"
In the case of an array (because the index is appended to the name), you can pass the name with a * at the end, and it will return a list of the values
Key Value
--- -----
Environment.SCOM.Preproduction[0] server-1.***.***
Environment.SCOM.Preproduction[1] server-2.***.***
Environment.SCOM.Preproduction[2] server-3.***.***
Hope this helps!
Ian