• Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Blocker Blocker
    • powershell-plugin
    • None
    • Jenkins 1.6.3.4 on Windows Server, various versions.

      [XXXXXInstaller] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\Users\Builder\AppData\Local\Temp\hudson506960763024489469.ps1'"
      Missing expression after unary operator '-'.
      At line:1 char:2
      + -E <<<< xecutionPolicy ByPass & 'xxxxxxxxxxxxx\hudson50
      6960763024489469.ps1'

      Reverted to the 1.2 plugin and it works fine.

      Also should note... The script ran fine before the update, it has not changed, and for giggles, I ran it manually on the server and it was ok. I don't think there is anything in the script that could be causing the issue.

          [JENKINS-31069] Error after 1.3 Powershell Plugin Update

          Alex Earl added a comment -

          What version of powershell are you using?

          Alex Earl added a comment - What version of powershell are you using?

          What's the status on this issue? Hit this in dotnet/corefx builds. Is the solution to downgrade to 1.2? Thanks!

          Lakshmi Priya Sekar added a comment - What's the status on this issue? Hit this in dotnet/corefx builds. Is the solution to downgrade to 1.2? Thanks!

          Alex Earl added a comment -

          lasekar What version of PowerShell are you using?

          Alex Earl added a comment - lasekar What version of PowerShell are you using?

          The powershell version is 5.0.10586.0

          Lakshmi Priya Sekar added a comment - The powershell version is 5.0.10586.0

          Alex Earl added a comment -

          I just tested with that version and am not seeing the issue. Can you give more info on what you are seeing specifically and how you have the plugin configured?

          Alex Earl added a comment - I just tested with that version and am not seeing the issue. Can you give more info on what you are seeing specifically and how you have the plugin configured?

          How did you test it? Running the command on powershell works, but through the jenkins workflow doesn't work. I did batchFile("Powershell -command \"\"my_ps1_with_arguments\"\"") to unblock myself. Notice the double pair of quotes around the ps1 script. If using only single pair of quotes, powershell throws error on argument parsing, as originally mentioned in the bug description.

          Lakshmi Priya Sekar added a comment - How did you test it? Running the command on powershell works, but through the jenkins workflow doesn't work. I did batchFile("Powershell -command \"\"my_ps1_with_arguments\"\"") to unblock myself. Notice the double pair of quotes around the ps1 script. If using only single pair of quotes, powershell throws error on argument parsing, as originally mentioned in the bug description.

          Alex Earl added a comment -

          lasekar I used the mvn hpi:run command in the source directory for the plugin. What version of Jenkins are you using? Perhaps there is something that changed with a more recent version of Jenkins than the plugin is built against (1.450 which is REALLY old).

          Alex Earl added a comment - lasekar I used the mvn hpi:run command in the source directory for the plugin. What version of Jenkins are you using? Perhaps there is something that changed with a more recent version of Jenkins than the plugin is built against (1.450 which is REALLY old).

          Alex Earl added a comment -

          Hi lasekar can you run with plugin 1.2 and use $PSVersionTable.PSVersion to dump the actual powershell version being used from Jenkins?

          Alex Earl added a comment - Hi lasekar can you run with plugin 1.2 and use $PSVersionTable.PSVersion to dump the actual powershell version being used from Jenkins?

          Alex Earl added a comment -

          Need more information to reproduce this issue. I haven't been able to do so.

          Alex Earl added a comment - Need more information to reproduce this issue. I haven't been able to do so.

            slide_o_mix Alex Earl
            gsxjay Jay Beeckman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: