I have an arraylist that is dynamic. It is created from the results of a get-mailboxexport command. Each entry has 3 values. 2 will definitely contain duplicate values and the other will potentially contain duplicates.
I only need to use 2 of the values however. So I have an Identity value and a status value. I need to be able to find all duplicate identity’s where at least one status is ‘Failed’.
I found this example $arrPies | Group-Object | Where-Object {$_.Count -gt 1} but it doesn’t quite seem to fit this situation. So I have tried this:
foreach ($i in $test)
{select-object -identity | group-object | where-object {$i.count -gt 1}
$i.identity
}
This still does not return any value. At this time I am not comparing the Status value, just wanting it to select any items where there are duplicate identities.