title: Parse WMIC output to set returned value as a variable (windows batch)
body: <p>I have the following command:</p>
  
  <pre><code>c:\wmic baseboard get Manufacturer
  Manufacturer
  ASUSTeK Computer INC.
  </code></pre>
  
  <p>I'd like to save it's output into variable and process some way like I did it with bash here: <a href="https://github.com/maaboo/AdminTools/blob/master/esxi_hwinfo.sh" rel="nofollow noreferrer">esxi_hwinfo.sh @ GitHub</a> e.g.: remove some sub-strings, shorten numbers, convert one string to another etc.</p>
  
  <p>Is it possible to iterate over lines inside variable and get for instance the second one? Examples which I've seen work only with files (<code>for /f "delims=" %%1 in ('type !foo!') do</code>). If I use variable instead of file it says that there is no such file.</p>
  
  <p>I don't want to use files as intermediaries since I think it's generally a bad idea.</p>
  
  <p>There is no problem code which I want to work. There is a question about technical implementation (or possibility) of what I'm trying to achieve. It's more like "how to" than "what's wrong" question (like the most in <a href="https://stackoverflow.com/questions/tagged/batch-file?sort=votes&amp;pageSize=15">here</a>)</p>