title: Simple logic statement in PowerShell using WMI
body: <p>In PowerShell, I'm typing the statement:</p>
  
  <pre><code>$var = Get-WmiObject win32_product | select-object name
  
  if ($var.name -like 'adobe') {write-host '123'}
  </code></pre>
  
  <p>The variable stores the list of installed products just fine; however, my <code>if</code> then won't catch anything. On execution I get no output or error. This works if I use something like <a href="http://technet.microsoft.com/en-us/library/hh849832.aspx" rel="nofollow">Get-Process</a>, but not with <a href="https://technet.microsoft.com/en-us/library/hh849824.aspx" rel="nofollow">Get-WmiObject</a>.</p>