Hi All.
I have a PS script which runs on an Script server and targets remote machines. Everything works fine, however the issue i am having is that I cannot get the output from my script back. I have tried several ways to do this, the closest thing I have so far is to use the getXML method, it dumps out a lot of XML but all I need is just the filename which my powershell script returns.
I would be grateful if anyone can explain to me how to do this correctly, I will need to do this a lot in the course of my work, sometimes my Ps file will be expected to return multiple values etc, but most of the time it will be a single value.
[2019-05-22 23:23:29.689] [I] Using PowerShell Aruments '-Servername xxxxxx -config_dir C:\TEMP -instance_no 02 -type TEST -admin_login xxxxxxxxxxxxxx -collation SQL_Latin1_General_CP1_CI_AS -sql_account "NT AUTHORITY\SYSTEM" -install_dir D: -sql_components "SQLENGINE,REPLICATION" -sql_dir H:\DATA01 -log_dir F:\LOG0 -backup_dir E:\BACKUPS -tempdb_dir X:\DIR'.
[2019-05-22 23:23:41.522] [I]
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False CmdletBindingAttribute System.Management.Automation.CmdletCommonMetadataAttribute
LastWriteTime : 22/05/2019 23:23:39
Length : 1196
Name : ServerName_SQL_Configuration_File_2019_05_22_11_23.ini
PSComputerName : ServerName
C:\TEMP\ServerName_SQL_Configuration_File_2019_05_22_11_23.ini
The above is the output when I run the workflow.
The bit my Ps script returns is C:\TEMP\ServerName_SQL_Configuration_File_2019_05_22_11_23.ini and this is what I want to capture into a variable. and pass onto another workflow