SQL Query to check the OSD Status

myquestforLearning 1 Reputation point
2020-10-05T22:30:09.933+00:00

Objective is to create a SCCM report which can help the Monitoring team understand which machine have been built successfully via SCCM OSD. We have not removed Continue on error from some steps because even though they install successfully, they show as fail in the logs.

Hence, we are trying to create this report with few conditions e.g. Action1-4 are successful and 11143 is found then the Build is successful. Following is my Work in progress query but it is returning 400000+ lines which are not even relevant. Please suggest.

Select ResourceID,LastStatusMessageIDName,LaststatusMessageID,
case
when ActionName = 'Action1' and LastStatusMessageIDName = 'The task sequence execution engine successfully completed an action' then 'Success'
when ActionName = 'Action2' and LastStatusMessageIDName = 'The task sequence execution engine successfully completed an action' then 'Success'
when ActionName = 'Action3' and LastStatusMessageIDName = 'The task sequence execution engine successfully completed an action' then 'Success'
when ActionName = 'Action4' and LastStatusMessageIDName = 'The task sequence execution engine successfully completed an action' then 'Success'
when LastStatusMessageID = '11143' then 'Success'
END AS Status
from v_TaskExecutionStatus where AdvertisementID = 'PS132862'

Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
902 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Simon Ren-MSFT 30,116 Reputation points Microsoft Vendor
    2020-10-06T15:06:58.897+00:00

    Hi,

    Thank you for coming Microsoft MECM Q&A forum.

    Here are some articles for your reference, hope they can do some help:
    SQL Query to track OSD
    Monitor OSD with Status Message Queries in ConfigMgr 2012

    Thanks for your time.

    Best regards,
    Simon


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Ilia Ershov 126 Reputation points
    2020-10-07T08:14:33.397+00:00

    You can use the following report to get detailed deployment status