SCCM How to find out the status of Predefined Maintenance Tasks

Let’s SCCM How to find out the status of Predefined Maintenance Tasks. We often need to know the status of maintenance tasks running on SCCM primary servers as part of troubleshooting. To┬ámaintain a healthy SCCM environment, maintenance tasks are critical. 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:

SCCM How to find out the status of Predefined Maintenance Tasks
SCCM How to find out the status of Predefined Maintenance Tasks

SCCM Maintenance Tasks SQL Query

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

Resource

How to Check Verify the Status of SCCM Predefined Maintenance Tasks – Check SCCM Predefined Maintenance Tasks Status (anoopcnair.com)

Patch My PC

About Author -> Anoop is Microsoft’s Most Valuable Professional Award winner from 2015 on the technologies! He is a Solution Architect on enterprise device management solutions with more than 20 years of experience (calculation done in 2021) in IT. He is Blogger, Speaker, and Local User Group Community leader. His main focus is on Device Management technologies like Configuration Manager, Windows 365 Cloud PC, Intune, Azure Virtual Desktop, Windows 10, and Windows 11.

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.