I am trying to build a form where you fill in some parameters that get saved as variables. The last piece is to upload a text file with a list of servers. I am saving that as a variable but when i try to use the variable in a foreach loop its not going through each server in the text file. Am I missing something silly?
i tried changing it to this but now in the debug log i can see it trying to pick the server from the path on my machine. Should I be trying another way to grab take the uploaded file .
2:44:20 [Warn] PowerShellExecutionService Error executing endpoint Form. Cannot find path ‘C:\Windows\System32\WindowsPowerShell\v1.0\SERVER1’ because it does not exist.
at , : line 4
12:44:20 [Warn] PowerShellExecutionService Error executing endpoint Form. You cannot call a method on a null-valued expression.
at , : line 12
I got it. Not sure if it was the best way to do it but i used the filestream to store the file locally on my machine. The i do a get-content on it, run through the loop and then delete the file. For some reason i thought the uploaded file would be stored in a variable and I just go through a loop from it like that.