I installed the PowerShell plugin and PowerShell Core on Linux.

      When I run a Windows PowerShell step it gets an error.

      I believe all that has to be adjusted is to alter the command line to remove the windows stuff:

      Instead of:

      powershell.exe -NonInteractive -ExecutionPolicy ByPass "& '/tmp/jenkins5628735582018675439.ps1'"

      Do:

      powershell -file '/tmp/jenkins5628735582018675439.ps1'

      I noticed there is mention of PowerShell for Linux support in the github repo - but if it is currently active, I can't figure out how to make it work.

      I should mention that I was able to run powershell with the regular shell plug-in - so I know it is on the path.

      powershell -command "write-host 'testing psh core'"

       

       

       

          [JENKINS-45832] Support for PowerShell Core on Linux

          Darwin Sanoy created issue -
          Darwin Sanoy made changes -
          Description Original: I installed the PowerShell plugin and PowerShell Core on Linux.

          When I run a Windows PowerShell step it gets an error.

          I believe all that has to be adjusted is to alter the command line to remove the windows stuff:

          Instead of:
          powershell.exe -NonInteractive -ExecutionPolicy ByPass "& '/tmp/jenkins5628735582018675439.ps1'"
          Do:
          powershell -file '/tmp/jenkins5628735582018675439.ps1'
          I noticed there is mention of PowerShell for Linux support in the github repo - but if it is currently active, I can't figure out how to make it work.
          New: I installed the PowerShell plugin and PowerShell Core on Linux.

          When I run a Windows PowerShell step it gets an error.

          I believe all that has to be adjusted is to alter the command line to remove the windows stuff:

          Instead of:
           powershell.exe -NonInteractive -ExecutionPolicy ByPass "& '/tmp/jenkins5628735582018675439.ps1'"
           Do:
           powershell -file '/tmp/jenkins5628735582018675439.ps1'
           I noticed there is mention of PowerShell for Linux support in the github repo - but if it is currently active, I can't figure out how to make it work.

          I should mention that I was able to run powershell with the regular shell plug-in - so I know it is on the path.

          powershell -command "write-host 'testing psh core'"

           

           

           
          Darwin Sanoy made changes -
          Description Original: I installed the PowerShell plugin and PowerShell Core on Linux.

          When I run a Windows PowerShell step it gets an error.

          I believe all that has to be adjusted is to alter the command line to remove the windows stuff:

          Instead of:
           powershell.exe -NonInteractive -ExecutionPolicy ByPass "& '/tmp/jenkins5628735582018675439.ps1'"
           Do:
           powershell -file '/tmp/jenkins5628735582018675439.ps1'
           I noticed there is mention of PowerShell for Linux support in the github repo - but if it is currently active, I can't figure out how to make it work.

          I should mention that I was able to run powershell with the regular shell plug-in - so I know it is on the path.

          powershell -command "write-host 'testing psh core'"

           

           

           
          New: I installed the PowerShell plugin and PowerShell Core on Linux.

          When I run a Windows PowerShell step it gets an error.

          I believe all that has to be adjusted is to alter the command line to remove the windows stuff:

          Instead of:
          {code:java}
          powershell.exe -NonInteractive -ExecutionPolicy ByPass "& '/tmp/jenkins5628735582018675439.ps1'"{code}

           Do:
          {code:java}
          powershell -file '/tmp/jenkins5628735582018675439.ps1'{code}

           I noticed there is mention of PowerShell for Linux support in the github repo - but if it is currently active, I can't figure out how to make it work.

          I should mention that I was able to run powershell with the regular shell plug-in - so I know it is on the path.
          {code:java}
          powershell -command "write-host 'testing psh core'"{code}
           

           

           

          Bryan Hundven added a comment - - edited

          Looks like support is in, but a release has not been made yet.

          https://github.com/jenkinsci/powershell-plugin/pull/5

          Bryan Hundven added a comment - - edited Looks like support is in, but a release has not been made yet. https://github.com/jenkinsci/powershell-plugin/pull/5
          Dominic S. made changes -
          Link New: This issue is related to JENKINS-49113 [ JENKINS-49113 ]
          Vivek Pandey made changes -
          Labels New: triaged-2018-11

          Martin Bauer added a comment -

          Martin Bauer added a comment - https://github.com/jenkinsci/powershell-plugin/releases/tag/powershell-1.4 Linux support was released on 1.4
          Martin Bauer made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            darwinjs Darwin Sanoy
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: