Powershell execution

  • Carlos

    Carlos - 2012-11-21

    Hi Rob,
    I'm performing some tests with oddjob and I'm getting some unexpected behavior executing powershell scripts with an oddjob exec; basically the execution never ends.
    I have tried several workarounds like call the execution using a bat file, using parameters like in the execute batch file example etc, but even the strout appears in the console and the powershell finish properly , it still appearing as running in the console until I stop it manually and the rest of the jobs are not executed.
    Many thanks in advance for your help.

    oddjob xml

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>

    Powershell sample

    # Filename: Helloworld.ps1
    Write-Host 'Hello World!'
    Write-Host "Good-bye World! `n"

    # end of script

  • Rob Gordon

    Rob Gordon - 2012-11-25

    Hi - A quick Google for 'powershell java exec' and it appears that running powershell from Java is problematic.

    However providing an empty stdin does appear to stop powershell from hanging.

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>

    Hope this helps,



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks