We have a bamboo plan which will trigger a PowerShell script to run in one of the remote systems we have. This PowerShell script is invoking an ant.bat file which is trying to fetch JAVA values and failing.
The error in bamboo log is same as the error from PowerShell ISE.
Also I'm getting the same error for java -version
command in PowerShell ISE.
How bamboo is executing the PS script? through ISE or terminal or any other way? If it executes in ISE is there a way to tell bamboo to run the script in terminal instead of ISE?
Why there is a difference in execution between terminal and ISE?
Any help on this will be helpful. Thanks in advance :)
Things I tried:
Made sure JAVA is installed and environment variables are set.
Logged into the same remote system and executed the same PS script manually from PS Terminal directly and it is passing. But when I run the same script from PowerShell ISE it is failing with the same error as bamboo log.