Here is the final version of the PoSh script:[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.ConnectionInfo")[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo")$server = new-object "Microsoft.SqlServer.Management.Smo.Server" "localhost"$job = $server.JobServer.Jobs["Test Job"]$now = Get-Datedo{ Start-Sleep -Seconds 1 $job | select Name,CurrentRunStatus,LastRunDate $job.Refresh()}while($job.LastRunDate -lt $now)$job | select Name,CurrentRunStatus,LastRunDate
===http://www.ElementalSQL.com/