Issue passing parameters
Posted: Mon Jan 28, 2019 4:41 pm
Having issues with using parameters in the Powershell pugin. I get the same results if I do a full function in the script panel as my quick little example. Can you let me know what I am doing wrong?
if I setup a param input and try to use the optional parameters, it is getting appended to the command line and breaking somewhere along the way. I've tested this against multiple client machines with the same results.
I made a quick example of what I am seeing.
Here is the output in the console window:
Sending script to agent .....
Script CMD = @powershell -NoProfile -ExecutionPolicy unrestricted -file "%windir%\temp\myPSScript.ps1 -identity administrator"
Executing Script ....Processing -File 'C:\Windows\temp\myPSScript.ps1 -identity administrator' failed because the file does not have a '.ps1' extension. Specify a valid Windows PowerShell script file name, and then try again.
if I setup a param input and try to use the optional parameters, it is getting appended to the command line and breaking somewhere along the way. I've tested this against multiple client machines with the same results.
I made a quick example of what I am seeing.
Here is the output in the console window:
Sending script to agent .....
Script CMD = @powershell -NoProfile -ExecutionPolicy unrestricted -file "%windir%\temp\myPSScript.ps1 -identity administrator"
Executing Script ....Processing -File 'C:\Windows\temp\myPSScript.ps1 -identity administrator' failed because the file does not have a '.ps1' extension. Specify a valid Windows PowerShell script file name, and then try again.