xxlyyk
3 years agoNew Contributor
powershell from groovy no longer working
We have a powershell script to get something from a msmq queue. This used to run fine before readyapi 3.10 (I'm not totally sure which the latest version was that we tried before that(, but in 3.10 en 3.20 the script no longer runs. Also other script no longer work. For example creating a simple folder.
import java.lang.String
def powerShellCommand ='New-Item -Path \'C:\\JSONJournal\' -Name \'tests\' -ItemType \'directory\''
log.info(powerShellCommand)
def shellCommand = "powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -Command \"${powerShellCommand}\""
def process = shellCommand.execute()
log.info(shellCommand)
process.waitFor()
log.info(process.exitValue())