title: PowerShell SCCM display Status Message Queries
body: <p>I'm currently programming some right-click tools in PowerShell for the SCCM 2012. 
  I'd like to program a tool, which displays the Status Message Queries of the right-clicked device. </p>
  
  <p>I'd like to have a smiliar view as the SCCM -> Monitoring -> Status Message Queries -> All Status Messages from a Specific System</p>
  
  <p>So far I have this WQL query:</p>
  
  <pre><code>select SMS_StatusMessage.*, SMS_StatMsgInsStrings.*, SMS_StatMsgAttributes.* 
  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_StatusMessage.MachineName = "MyMachineName"
  </code></pre>
  
  <p>but this doesn't give the description as I see in the "All Status Messages from a Specific System". (see screenshot).</p>
  
  <p>Does anyone know how I get the description of a Status Message?</p>
  
  <p>Best regards
  faebuk</p>