Comparing array variables in PowerShell
I have this script to compare two folders. $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." } As you can see, I compare the same folder. Problem is, that it will never consider, that the arrays are equal. Why? Enrico Campidoglio In PowerShell, variables that point to arrays are evaluated in expressions by enumerating the contents of the arrays themselves. For example this expression: $firstFolder | Get-Member will return information about