title: How to export all rows of a WMI query to a file?
body: <p>Given a query such as </p>
  
  <pre><code>SELECT * FROM WIN32_PROCESS
  </code></pre>
  
  <ol>
  <li>Is there a way to interrogate the result object for the names of the columns returned?</li>
  <li>Write all the rows in the result object to a text file, say </li>
  </ol>