Environment Variables are not always exposed to the java compiler. Your stack error is just telling you it cannot find the powershell executable, because it doesn't automatically know to look in the $PSHOME var.
The fix is just to specify the full path:
Change "powershell.exe"
to "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"