title: Contains operator not working in Powershell
body: <p>I have never got the <code>-contains</code> operator to work in Powershell I don't know why.</p>
  
  <p>Here's an example of where it isn't working. I use <code>-like</code> in its place but I'd love it if you could tell me why this isn't working.</p>
  
  <pre><code>PS HKLM:\Software\Microsoft\Windows NT\CurrentVersion&gt; (gp . P*).ProductName
  Windows 10 Enterprise
  
  PS HKLM:\Software\Microsoft\Windows NT\CurrentVersion&gt; (gp . P*).ProductName -contains "Windows"
  False
  
  PS HKLM:\Software\Microsoft\Windows NT\CurrentVersion&gt; (gp . P*).ProductName | gm | select TypeName | Get-Unique
  
  TypeName     
  --------     
  System.String
  </code></pre>