I am just beginning to use PowerShell in Power Automate Desktop. I have a fairly complex script that needs to run (creating a Microsoft Team) and I will need to pass various results back after the script finishes. Since I'm just starting, my script is only attempting to pass a variable straight through.
%TeamName% is an input variable that I set to "Test Team", then I call the PowerShell script, which is just this:
$TeamName = "%TeamName%"
write-output $TeamName
It looks like the issue is that I'm using the "Read text from file" action to read in the .ps1 script file into a variable, which is then executed by the script.
Is there a way to do this while still reading the script from a file? It is so much more convenient than having to edit the script in the little window. Right now, the script is just two lines, but the script I will need to run is much longer, so being able to use a script editor, just clicking "save", instead of clearing out the window and cutting and pasting the code is definitely desirable.