How to wait Start-Process RRS feed

  • Question

  • Hello,

    I'm running a script on a host like :

     Invoke-Command -ComputerName MYHOST -FilePath "\\myshare\script.ps1"

    The script.ps1 should do stuff like :

    Start-Process -Wait -FilePath "$powershellpath\$filename" -ArgumentList "/quiet /norestart"

    But it seems that it doesn't wait and the parent process end the all operation.

    Any Idea ?


    • Moved by Bill_Stewart Tuesday, November 7, 2017 10:44 PM Unanswerable drive-by question
    Tuesday, October 3, 2017 8:07 AM

All replies

  • Start-Process does not wait.

    Start-Process -Wait

    will wait but not on most installers.


    Tuesday, October 3, 2017 8:35 AM
  • Can you please reply with below question so that we can help you

    Why do you want to wait after starting the process? 

    What are you trying to achieve?

    Tuesday, October 3, 2017 9:55 AM