title: Compare Two arrays in PowerShell Not working
body: <p>I have two arrays, on as a result of loading a txt file with vSphere VMNames and the other as a result of a PowerCli query:</p>
  
  <pre><code>$WindowsVMsVsphere = Get-VMguest * | Where-Object {$_.OSFullName -like "*Windows*" } | Select-Object vmName
  
  $WindowsVMsExcel = Get-Content -Path C:\temp\vms.txt
  </code></pre>
  
  <p>When I compare both arrays (to match same name Vms) I get the following result (this is just an extract):</p>
  
  <pre><code>@{VmName=VMNAME1}                             =&gt;
  VMNAME1                                       &lt;=
  </code></pre>
  
  <p>Clearly the problem is that I amnot comparing the same values, I am comparing sub-arrays inside one array with values from another array.</p>
  
  <p>I am pretty new to advanced PowerShell, can anybody give me some hints?.</p>
  
  <p>Thanks!</p>