Monitor ConfigMgr Task Sequence with Status Message Query

Device management

This is not about monitor Task Sequence Deployment status, it is about monitor Task Sequence itself.

I use package ID instead of Deployment ID, because you might need to deploy same Task Sequence to many collections with different schedule, and you will have many deployments of same Task Sequence. I don’t want to create many queries for each deployments of same Task Sequence. So let’s be lazy and just create ONE query.

  1. Find you package ID, in my case it is ZIT0000F

  2. Create new Status Message Query

  3. I like to use Name “01. MDT Install Windows”, using numeric will put your custom queries ahead of other default queries, it’s a bit easier to find them later
  4. Click “Edit Query Statement…”

  5. Click “Show Query Language”

  6. Copy these codes and paste them in the query box. Change line 7  ZIT0000F to your own Package ID, then Next, Next.
    select SMS_StatusMessage.*, SMS_StatMsgInsStrings.*, SMS_StatMsgAttributes.*, SMS_StatMsgAttributes.AttributeTime 
    from SMS_StatusMessage 
    left join SMS_StatMsgInsStrings 
    on SMS_StatMsgInsStrings.RecordID = SMS_StatusMessage.RecordID 
    left join SMS_StatMsgAttributes 
    on SMS_StatMsgAttributes.RecordID = SMS_StatusMessage.RecordID 
    where SMS_StatMsgAttributes.AttributeValue = "ZIT0000F" and SMS_StatMsgAttributes.AttributeTime >= ##PRM:SMS_StatMsgAttributes.AttributeTime## 
    order by SMS_StatMsgAttributes.AttributeTime 
    DESC

  7. Right-Click you Status Message Query, click Show Messages

  8. Select date and time, then click OK

  9. Now you can monitor your Task Sequence status.

 

6 thoughts on “Monitor ConfigMgr Task Sequence with Status Message Query

  1. Is there a way to show the computer name on the system column after its the computer name has been updated in the OSD?

    1. I am not 100% sure, but I think cannot change system column to show computer name in status message query. When install new machine, it always shows MININT-xxxxxx as System name, if reinstall machine that is already in ConfigMgr database, then it shows the computer name in system column.

      However, these are few links you can check it out. Trevor Jones has many post about monitor/reporting OSD, they are my favorites.
      https://smsagent.wordpress.com/2015/01/16/an-easy-way-to-monitor-your-configmgr-os-deployments/
      https://smsagent.wordpress.com/2016/01/19/send-a-weekly-os-deployment-summary-report-with-powershell/
      https://smsagent.wordpress.com/2015/11/17/free-configmgr-task-sequence-monitoring-tool/

  2. Thank you for sharing Sandy.
    I was using a query before to monitor based on the Deployment ID, and like you said, there were multiple deployments for the same Task Sequence Package. This solves the issue of creating multiple queries for one pkg.

Leave a Reply

Your email address will not be published. Required fields are marked *

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