Honestly, there are a lot of things wrong here. Unsure what you arr trying to accomplish, but...
In your scenario your target would be the windows machine that houses the batch script. You would feed the linux target of the script as a parameter to the blpackage.
nexec should be in your path so you don't need to specify the full path to it. so you could run:
nexec -i -e cmd /c "echo .|powershellC:/commandLineBVT/RunTests.bat"
what is in the RunTests.bat - are there powershell commands there?
RunTests.bat is a simple batch script, as follows -
java -cp %classpath% com.abc.scripts.core.Runner
btw, Adam's comment is sort of helpful. The batch script lives in a windows host. Given that, it has to be executed against a windows host with unix host / port number passed as local property setting for the BL package and that way it is parameterized.
Not sure whether we can do cross platform magic like being able to run a batch script against linux target.
If it’s just command line and now powershell, why are you calling it w/ powershell?
The error in the OP is that it can't find nexec, and I think someone else answered that part already. Like the other responders, I'm confused as to what you're trying to actually do. Is the Windows server the app server? is the linux server the app server? Are they both target servers?
Have you tried just creating an nsh script? They run the same on Windows or linux. Have the appserver run the script (doesn't matter if its a Windows or linux appserver) and pass the variables from a text file or wherever you have that data stored. Then just create an NSH Script job to run the script.
i'm not clear how this is being called - via a blpackage or a nsh script ?
Both the appserver and target server are linux systems but they are different (not the same). could you please give me suggestion regarding how I can have appserver run the nsh script. Now I have it as nsh script.
you can add the nsh script to the depot as a nsh script object, that will automatically upload the script into the bladelogic depot. then you can create a nsh script job from that object and run that against your targets.