I would probably use the -file argument, as in
-file "C:\PowershellScripts\script.ps1"
You may need to install the execution policy first, if it is not already installed on your system indefinitely.
On my machine, a 64-bit version of Windows 7 with 64-bit Eclipse and 64-bit jdk (1.6), I can make it work if I set the "arguments" field:
-executionpolicy unrestricted -file "c:\code\test.ps1"
An alternative that also worked for me was:
Set the application to run as C:\Windows\System32\cmd.exe
Set the argument field to something like:
/c "powershell -executionpolicy unrestricted -file c:\code\test.ps1"
To me, this seems like an unnecessary Rouba Goldbergians, but it's worth trying to find out if your problems can work with the help of a regular shell.
I briefly got symptoms similar to what you described, but I can no longer reproduce them.
source
share