Powershell to start application in foreground

Welcome Forums General PowerShell Q&A Powershell to start application in foreground

This topic contains 3 replies, has 3 voices, and was last updated by

 
Participant
8 months, 3 weeks ago.

  • Author
    Posts
  • #94797

    Participant
    Points: 0
    Rank: Member

    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?

  • #94798

    Participant
    Points: 23
    Rank: Member

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

    • #94800

      Participant
      Points: 0
      Rank: Member

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

  • #94803

    Participant
    Points: 154
    Helping Hand
    Rank: Participant

    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.

The topic ‘Powershell to start application in foreground’ is closed to new replies.