schtasks.exe or get-scheduledtasksinfo last run results codes.

Both the command line utility schtasks.exe” and the PowerShell command Get-ScheduledTaskInfo will return a column named “Last result”. The return codes differ from the last run result format you typically find in the UI.

Here is some of the status codes from last result:

0 - The operation completed successfully.
1 - Incorrect function called or unknown function called. 2 File not found.
10 - The environment is incorrect. 
267008 - Task is ready to run at its next scheduled time. 
267009 - Task is currently running. 
267010 - The task will not run at the scheduled times because it has been disabled. 
267011 - Task has not yet run. 
267012 - There are no more runs scheduled for this task. 
267013 - One or more of the properties that are needed to run this task on a schedule have not been set. 
267014 - The last run of the task was terminated by the user. 
267015 - Either the task has no triggers or the existing triggers are disabled or not set. 
2147750671 - Credentials became corrupted. 
2147750687 - An instance of this task is already running. 
2147943645 - The service is not available (is "Run only when an user is logged on" checked?). 
3221225786 - The application terminated as a result of a CTRL+C. 
3228369022 - Unknown software exception.

Leave a Reply

Your email address will not be published.