i'm trying to execute new instances of powershell in a loop and pass in parameters. I am able to do this but the additional arguments for setting the window size seems to break things.
Current working without setting the window size
start-process powershell -argumentlist "-noexit -file c:\test\script.ps1 -port 12345"
If I run the below in isolation it works but I can't seem to figure out how to merge this with the above
powershell -argumentlist "-noexit mode con:cols=72 lines=5"
I tried the following but that gave an error:
powershell -argumentlist "-noexit mode con:cols=72 lines=5 -file c:\test\script.ps1 -port 12345"
Invalid parameter - -file