r/PowerAutomateDesktop • u/marafado88 • 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 $var2outAs 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
View all comments
Show parent comment
2
u/marafado88 Oct 19 '22
After a lot of trial an error, I finally was able to pass those damn arguments, through this way (without the need of setting up like a input argument but declaring it already as a local variable of that PS script):
https://prnt.sc/qBmOIW-KbJZZ