#Returns the status object of the sync process $oExec; $oExec = system($stepName); $ouputStream = ""; while($? eq 0){ Do While Not oExec.StdOut.AtEndOfStream ouputStream = ouputStream & oExec.StdOut.ReadAll Loop sleep 100; } Do While Not oExec.StdOut.AtEndOfStream ouputStream = ouputStream & oExec.StdOut.ReadAll Loop #WScript.StdOut.Write ouputStream return $oExec; }