For simple objects, like strings or numbers, the cmdlet compares the values of the objects. For complex objects, you must provide one or more properties to be used for comparison.
If you do provide a property, the cmdlet checks for IComparable interfaces to perform the comparison. If that fails, the objects are converted to strings and the string values are compared.
у меня вышло нечто такое for($i =0; $i -lt $ex1.count; $i++){ compare-object $ex1[$i] $ex2[$i] -Property @(($ex1[$i] | gm | where MemberType -eq NoteProperty).name)}