Finding duplicates in an array

Question:

The following code results in an Array:

This generates:

I’m trying to figure out how I can have it report the duplicates, in this case the desired outcome would be P1 and P3 as they both have the same info in them:

Because the values are not in the same object it’s not as simple as using Group-Object to retrieve them. Any help would be appreciated.

Answer:

Finally figured it out:

Source:

Finding duplicates in an array by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply