How does the "Last Result" column of Scheduled Tasks in Windows Server 2003 get set from a process or script?

Posted by leeand00 on Server Fault See other posts from Server Fault or by leeand00
Published on 2012-08-17T17:43:50Z Indexed on 2012/10/04 21:41 UTC
Read the original article Hit count: 173

The Last Result column of the Scheduled Tasks Window on Windows Server 2003, displays the result of the execution of the .exe, .vbs, .ps1, .bat, .cmd, etc... that has been run at the scheduled time.

There is also an archived history of this value that appears in the Scheduled Tasks Log (Found on the Scheduled Tasks Window under the Advanced->View Log)

Now my question is, if I'm running a scheduled task that is a .exe, .vbs, .ps1, .bat, .cmd, etc... how do I use that process to return a specific Last Result when the process ends?

P.S. If you think this question should be split up into smaller parts since I'm painting pretty broadly with it, just let me know and I'll split it into subsequent smaller questions

© Server Fault or respective owner

Related posts about windows-server-2003

Related posts about powershell