Friday, February 21, 2014

Monitoring Deployments in SCCM 2012 R2

 

Monitoring Deployments in SCCM 2012 R2

If you are running in to problems with your Task Sequence deployments in SCCM, it is nice to have a central view of the errors, rather than looking in the local log files of the client.

This can be achieved by using Status Message Queries.

At first you will need to get the Deployment ID of the task sequence:

Then navigate to the status message queries section in your SCCM console:

Monitoring -> Overview -> System Status -> Status Message Queries, and click Create Status Message Query.

Give your query a name (include your Task Sequence name if you like), and click 'Edit Query Statement'.


Then click on 'Show Query Language'
Copy the following Query into the Query Statement, and click OK.

Replace the site code (P01) and the Deployment ID (P012002A), in the query with your own data.
select stat.*, ins.*, att1.*, att1.AttributeTime from SMS_StatusMessage as stat left join SMS_StatMsgInsStrings as ins on stat.RecordID = ins.RecordID left join SMS_StatMsgAttributes as att1 on stat.RecordID = att1.RecordID inner join SMS_StatMsgAttributes as att2 on stat.RecordID = att2.RecordID where att2.AttributeID = 401 and att2.AttributeValue = "P01200ED" and stat.SiteCode = "P01" and att2.AttributeTime >= ##PRM:SMS_StatMsgAttributes.AttributeTime## order by att1.AttributeTime desc


 


Click OK and finish the wizard.
Now we can try and run the query.

Rightclick the query, and click on Show Messages.
You'll get a question to fill in a time span:
 




Click OK.
You should see something like this:



 
Now you can doubleclick any message to see its details.

Happy troubleshooting!