I must be missing something. i have to variables: $var1 and $var2
$var1 | gm TypeName: System.Collections.Hashtable
Each of them has IP and Por
I've had problems with my functions when calling them with parenthesis. Have you tried calling your function like so?
CompareData -data1 $var1 -data2 $var2