SCCM How to find out the status of Predefined Maintenance Tasks

SCCM Maintenance Tasks

Many times we need to know the status of maintenance tasks running on SCCM primary servers as part of troubleshooting. To maintain, a healthy SCCM environment the maintenance tasks are very important. SCCM Maintenance Tasks results via PS or SQL.

Completion Status 0 means the task finished successfully. There is a table called SQLTaskStatus which holds this data. We can also add a column to find the time a task took to run. The query for the same would be:

select *,
floor(DATEDIFF(ss,laststarttime,lastcompletiontime)/3600) as Hours,
floor(DATEDIFF(ss,laststarttime,lastcompletiontime)/60)- floor(DATEDIFF(ss,laststarttime,lastcompletiontime)/3600)*60 as Minutes,
floor(DATEDIFF(ss,laststarttime,lastcompletiontime))- floor(DATEDIFF(ss,laststarttime,lastcompletiontime)/60)*60 as TotalSeconds
from SQLTaskStatus


Origin of the Query – It seems this link is not working now. All the credit to the original post owner.

How to Check Verify the Status of SCCM Predefined Maintenance Tasks – Check SCCM Predefined Maintenance Tasks Status (

6 thoughts on “SCCM How to find out the status of Predefined Maintenance Tasks”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.