AnsweredAssumed Answered

Register variable not working with powershell

Question asked by Tyler_Auerbeck_8064 on Sep 19, 2016
Latest reply on Nov 17, 2016 by Pete Wirfs
I'm having some issues getting :register_variable to work within our powershell scripts. What I'm trying to do is clob together the output of some of our scripts in a specific format and then publish that variable out to the rest of our workflow. The problem I'm having is that whenever I go to run the job, I get the output "Variable 'X#' has not yet been defined."

Here are the vital components of the scripts:

In Process Tab:
    :REGISTER_VARIABLE output#,$OUT

In Post-Process Tab:
    :PUBLISH &output#,,"WORKFLOW"

The error seems to indicate that it's the publish command that doesn't know about the output commands existance.

I wasn't sure if we actually needed to make any modifications to REGISTER_VARIABLE.WINDOWS or UC_EXT_INTERPRETERS_WINDOWS due to the fact that we already have our agent .ini file set up to allow for the windows agent to act as an interpreter for powershell. We have a number of other powershell jobs that we just dump directly into the process tab versus pointing the windows agent at a powershell file.

Is there anything I'm missing in order to get this working?


Outcomes