I have written a PowerShell script to launch few webjobs in my local machine. My script is working fine and is launching each webjob in a new console window as expected. However, the issue I am facing is that if there is some problem with the webjob, the errors are displayed in the console window of that respective webjob. But before I can even read what it is, the window closes automatically.
Can anybody please suggest a fix for this where the window for the webjob doesn't exit when it has errors?
Currently, I am using this statement to launch them up separately in new window and tried using -NoExit
in the hope that it will not terminate the window :
Start-Process dotnet.exe -ArgumentList "-file .\ProjectName.exe" -NoExit