Unable to pass argument to powershell file via powershell action step

KHyatt
Tera Contributor

Hi,

I have a Powershell file on MID server that can be called sucessfully with the Powershell Action Step. It returns the output and a json but the argument is not received by it. What am i doing wrong? Any help would be appreciated.

 

Param (
[string]$CustID)

Write-output "Hi $CustID"

Get-LocalUser 'test_local' | ConvertTo-JSON

 

The action step script is

scriptfile.png

The action input it

input.png

The value that is passed as parameter is

input_filled.png

The output is returned successfully but the parameter was not received, so nothing after the Hi. It should say "Hi John" as I passed John as the parameter

output.png

2 REPLIES 2

mugi-san
Kilo Sage

Hi @KHyatt 

 

If no output is defined, nothing will be output by default (OOTB). Therefore, we recommend defining outputs both for individual steps and after the entire sequence of actions.

 

Regards.

KHyatt
Tera Contributor

Thank you for the reply, I added the output but still it is not receiving the parameter. 

The parameter is "John" but the output is still "Hi from MID Server" where as it should be "Hi John from Mid Server"

snow.png

Regards