strServer = "your_server_name" strTask = "task_name" Continue = MsgBox ("Scheduled job " & strTask & " will run on " & strServer & ". Are you sure?",vbYesNo + VBQuestion, "Run scheduled task") If Continue = vbYes then Const OpenAsASCII = 0 Const FailIfNotExist = 0 Const ForReading = 1 sExe = "SCHTASKS /Run /S " & strServer & " /TN " & strTask Set oShell = CreateObject("WScript.Shell") Set oFSO = CreateObject("Scripting.FileSystemObject") sTemp = oShell.ExpandEnvironmentStrings("%TEMP%") sTempFile = oFSO.GetSpecialFolder(2).ShortPath & "\" & oFSO.GetTempName oShell.Run "%comspec% /c " & sExe & " " & sTempFile, 0 , True Set fFile = oFSO.OpenTextFile(sTempFile, ForReading, FailIfNotExist, OpenAsASCII) ' capture output and inject into a variable sResults = fFile.ReadAll fFile.Close oFSO.DeleteFile(sTempFile) MsgBox sResults , vbInformation , "Result" Else wscript.quit End If