PowerTip: Wait for PowerShell Job to Complete
Summary: Learn how to wait for a Windows PowerShell job to complete.
How can I use Windows PowerShell to wait for a job that I have run to complete?
Use the Wait-Job cmdlet, and specify the job ID, for example:
Wait-Job –ID 5