Using interpreter prefix I add to script-exec the following:
powershell -Noprofile -File
This is what I get in the output
Processing -File 'D:\Downloads\rundeck\var\tmp\dispatch7415413838460298179.tmp.bat' failed because the file does not have a '.ps1' extension. Specify a valid Windows PowerShell script file name, and then try again.
There is no way that powershell will accept anything other then .ps1 and since we deal with interpreter as a prefix, there is no way to fix it the other ways.
I suggest to allow configuration of this extension or provide better mechanism for custom interpreter, the one that will allow for more precision in placement alike to printf.
To fix this problem I either have to
- not use script-exec but script-file which is not the same thing
- use some cmd.exe wrapper script which is noisy
BTW, it would be good to support powershell for executing commands and script files and scripts by default on Windows, since, cmd is outdated 10 years ago.