For example, when running $x = 1..100 | % {$_, ($_ + 1)}
, I would expect this to happen:
PS X:\Folder> $x[0]
1
2
PS X:\Folder> (Compare-Object $x[0] (1,2) -SyncWindow 0).length -eq 0
True
However, this happens:
PS X:\Folder> $x[0]
1
PS X:\Folder> (Compare-Object $x[0] (1,2) -SyncWindow 0).Length -eq 0
False
Why is this, and how can it be avoided?