1

I'm using the Jenkins Plugin (not pipeline) Windows Powershell for my scripts. Everything is fine, if the script is written directly into the Command-Window. But for some more complex operations I'm using a .ps1-File located on my SCM, since all that code is too confusing for that tiny Command-Window. The script is triggered properly, but I don't get any output (Write-Host) of that file.

How I run the script:

cd MyScripts
if ($env.CONDITION -eq "condition") {
    powershell -File .\myScript.ps1 $env.HOST
}

Is there any clue I'm missing?

MarcoB
  • 51
  • 2
  • 6

0 Answers0