title: How to check windows OS update status using Javascript or Node.js?
body: <p>I am looking for a way to check whether windows OS and security updates are up to date or not. <strong>If not then I would like to fetch this information. Apart from this, If there is any update available then I would like to fetch this information too.</strong></p>
  
  <p>I read several blogs and StackOverflow questions and got the following answers:</p>
  
  <ol>
  <li>Using <code>wmic qfe list</code> but this gives information about the already installed update without status (I need to read status such as fail, aborted or success).</li>
  <li>Using the following Powershell script (this gives information about whether an update is available or not):</li>
  </ol>
  
  <pre><code>$u = New-Object -ComObject Microsoft.Update.Session
  $u.ClientApplicationID = 'MSDN Sample Script'
  $s = $u.CreateUpdateSearcher()
  $r = $s.Search('IsInstalled=0')
  $r.updates|select -ExpandProperty Title
  </code></pre>
  
  <p>Is there any way to check "Whether windows OS and security updates are up to date or not? If not then get status (failure, aborted etc.). If any update is available then I would like to fetch information about the available update".</p>
  
  <p>How can I achieve this using Javascript or Node.js?</p>