Using start-process and -wait command in Powershell
you can use this command easy :
$myprocss = Start-Process "powershell" -PassThru
$myprocss.WaitForExit()
this command will continue when process end .
Using Start-Process
, there's an option for waiting:
Start-Process -Wait -FilePath "do_things.exe" -ArgumentList "argument another_argument"