It's a while since I wrote a script to do this and I don't have a copy of it handy. Have you tried Start-Process -Wait? If none of the execution cmdlets/functions are waiting for the process you could consider using the Wait-Process cmdlet or parsing the log file.
↧