title: Comparing array variables in PowerShell
body: <p>I have this script to compare two folders.</p>
  
  <pre><code>$firstfolder = Get-ChildItem C:\firstfolder
  $secondfolder = Get-ChildItem C:\firstfolder
  
  if ($firstfolder -eq $secondfolder) {
  Write-Host "Folders are the same."
  } else {
      Write-Host "Error: Doesn't match."
  }
  </code></pre>
  
  <p>As you can see, I compare the same folder. Problem is, that it will never consider, that the arrays are equal. Why?</p>