Powershell to start application in foreground

Hi Team,
I have few .net console apps which i want to start remotely using powershell. Using Start-process giving the path to the console executable i am able to start the application however they run in the background. So i do not see the app console to check for any error. IS there a way to run the application in foreground using PS?

Hello, did you try with start-process … -WindowStyle Normal ?

Yes, but i want to run it from remote machine. I tried using invoke-command but it is not working as expected.

You can’t. Remote sessions are always “in the background”. If I remember right that’s a security feature. You’re not allowed to interact remotely with an interactive local session.