Wednesday, October 8, 2014

Cross Post: SCOM 2012x UNIX/Linux Computers View Error: ‘An Item With The Same Key Has Already Been Added’

Issue
When I tried to open the view UNIX/Linux Computers in the Administration pane of a SCOM 2012x environment, I got this error:
image

Cause
After some searching on the internet I found this article written by Gustavo Méndez. He had experienced the same issue and solved it. The same posting tells exactly what caused it, and even better, how to solve it.

Credits
All credits go to Gustavo Méndez. Thanks for sharing.

3 comments:

Wilson W. said...

I have this exact same issue and I opened a case with Microsoft tech support on it. Their answer was that this issue is fixed with the latest update rollup patches. I am on SP1 UR2 so they basically said this issue was fixed in UR7.

Ene Marius said...

You can also use this:

Import-Module OperationsManager
#get the duplicates
$Values1 = Get-SCOMClass -Name Microsoft.Unix.OperatingSystem | Get-SCOMClassInstance | select -ExpandProperty Path
$Values2 = Get-SCOMClass -Name Microsoft.Unix.OperatingSystem | Get-SCOMClassInstance | select -ExpandProperty Path | select -Unique
$result = Compare-Object -ReferenceObject $Values1 -DifferenceObject $Values2
$result
#to remove the agents
$SCXagents = $result.InputObject | % { Get-SCXAgent -Name $_ }
$SCXagents | Remove-SCXAgent -Verbose

Stian Haughom said...

We have the same issue. All servers on 2012R2 UR8. We upgraded from 2012sp1 UR5 4 weeks ago.