Get-Task Wait-Task

Fixed code to find task ID and wait for task to complete.