I have the following problem with powershell.
I have a list of strings call it $machine_list which
I know there are duplicates.
The following code produces the following output:
$machine_list.count -- 15375
$a = $machine_list | Select-Object -Unique
$a.Count -- 12134
$b = $machine_list | Group-Object -NoElement
$b.Count -- 12082
I am trying to get a unique list and looking at different
ways of doing it.
So in my example above why are the counts different?
Should they not be the same - $a.Count -eq $b.Count?
I am hoping somebody can explain this in more detail to me.
Also is there a way I can compare the results to see how they
differ? (Comparing $a with the Name Values of $b).