@rmoortgat , this is weird, since powershell.exe comes with Windows itself (in newer OS versions), in its OS base directory (usually C:\Windows\...).
Can you please open a normal command prompt (NOT powershell/pwsh prompt, i.e. running cmd.exe), and execute these two commands in order:
cd\ to go at the root level of current drive (usually C:)
from there, run dir /s/b | findstr /i/e "powershell.exe"
and be sure that it is found where it is supposed to?
The problem is that MS changed the command from powershell to pwsh in the latetst version 7.
I solved the problem with changing powershell into pwsh in the batch files.
I think we can conclude here.
MPI coarray programs run flawlessly from the Intel command line, however I didn’t succeed up to now to run them from within VS Studio.
It has something to do environment variables.
Adding c:\windows\system32 to the path didn’t solve it.
I get: SearchPath ERROR_code=2
I already wasted too much time and sleep on this.
Thank you all for the advice.