The PowerShell Guy : PowerShell : The Admin Development Model
This is a cool way to wait for an application to complete before continuing. This is a core .NET thing so it will not only work for PowerShell but it will also work for C# and VB too.
The PowerShell Guy : PowerShell : The Admin Development Model