Cannot run program "powershell" when powershell 6.0 core installed

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Having installed Powershell 6.0 Core on our linux agents, there is no longer a program called "powershell". It is called "pwsh", and as such anything calling "powershell" will fail.

      Example:

      Fails:

      sh('powershell -version')

      Works:

      sh('pwsh -version')

      A workaround is to make a symbolic link between pwsh -> powershell.

      ln -s /usr/bin/pwsh /usr/bin/powershell

            Assignee:
            Unassigned
            Reporter:
            Jon Brohauge
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: