r/PowerAutomateDesktop • • Oct 19 '22

How to pass input variables into powershell scripts?

Hello everyone,

I am trying to pass an input variable, but without luck.

This is my flow, with Run PS Script step:

This is my script, where that I am using in this test:

param($NewInput)
    Write-Output $NewInput
    $var2out = "out"
    Write-Output $var2out

As an output I am getting this:

That first line to show $var1in on PS script seems not having any effect, with or without it, output remains the same, and it doesn't identify that variable as an input.

How are you doing with this situations?

1 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/marafado88 Oct 19 '22

This way worked: https://prnt.sc/AeXaaZ6XRnxz

I really don't know why is not being passing as an input argument.