Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72235

WinRM does not work with PowerShell Core in Linux

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • winrm-client-plugin
    • Jenkins: v2.428
      Linux OS: RHEL 8
      Powershell: 7.3.2
      WinRM Client Plugin: 1.0

      Powershell is now Powershell Core and it is called in Linux with pwsh instead of powershell

      Due to this, WinRM Plugin fails to create the ps1 script and also to run it.

       

      13:12:43 $ powershell -NonInteractive "& '/tmp/jenkins1283185757151977447.ps1'"
      13:12:43 FATAL: Cannot run program "powershell": error=2, No such file or directory
      13:12:43 ERROR: WinRM Operations failed.

       

       

          [JENKINS-72235] WinRM does not work with PowerShell Core in Linux

          Agron created issue -
          Agron made changes -
          Description Original: Powershell is now Powershell Core and it is called in Linux with {{pwsh}} instead of {{powershell}}

          Due to this, WinRM Plugin fails to create the {{ps1}} script and also to run it.

          {{13:12:43 $ powershell -NonInteractive "& '/tmp/jenkins1283185757151977447.ps1'"}}
          {{13:12:43 FATAL: Cannot run program "powershell": error=2, No such file or directory}}
          {{13:12:43 ERROR: WinRM Operations failed.}}
          New: Powershell is now Powershell Core and it is called in Linux with {{pwsh}} instead of {{powershell}}

          Due to this, WinRM Plugin fails to create the {{ps1}} script and also to run it.

           
          {code:java}
          13:12:43 $ powershell -NonInteractive "& '/tmp/jenkins1283185757151977447.ps1'"
          13:12:43 FATAL: Cannot run program "powershell": error=2, No such file or directory
          13:12:43 ERROR: WinRM Operations failed.{code}
           

           
          Agron made changes -
          Description Original: Powershell is now Powershell Core and it is called in Linux with {{pwsh}} instead of {{powershell}}

          Due to this, WinRM Plugin fails to create the {{ps1}} script and also to run it.

           
          {code:java}
          13:12:43 $ powershell -NonInteractive "& '/tmp/jenkins1283185757151977447.ps1'"
          13:12:43 FATAL: Cannot run program "powershell": error=2, No such file or directory
          13:12:43 ERROR: WinRM Operations failed.{code}
           

           
          New: Powershell is now Powershell Core and it is called in Linux with *{{pwsh}}* instead of *{{powershell}}*

          Due to this, WinRM Plugin fails to create the *{{ps1}}* script and also to run it.

           
          {code:java}
          13:12:43 $ powershell -NonInteractive "& '/tmp/jenkins1283185757151977447.ps1'"
          13:12:43 FATAL: Cannot run program "powershell": error=2, No such file or directory
          13:12:43 ERROR: WinRM Operations failed.{code}
           

           
          Agron made changes -
          Labels Original: jenkins plugin New: jenkins plugin winrm
          Mark Waite made changes -
          Comment [ Any update for this issue?

          {color:#c1c7d0}[fnaf games|https://fnafgames.io]{color} ]

            pskumar448 Suresh Kumar
            agrondemiraj Agron
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: