In a Powershell script I would like to launch a process (a java program) using the batch "Start" command. The reason for using this is that I would like to have control over process priority as well as the CPU numa node and affinity assignment, and the only way I have found to do that is through batch "Start" (https://ss64.com/nt/start.html).
As an example, in Powershell I can run
cmd /c myprocess
without problems, but running
start /AboveNormal "windowname" myprocess
I get the error "Start-Process : A positional parameter cannot be found that accepts argument ... ". Running from a batch script it runs fine.
It looks to me like Powershell is trying to execute the command using the native "Start-Process", but I am not sure how to overwrite that. Any suggestions would be appreciated.