Two bugs with OpsMgr Self-Maintenance MP's "OpsMgr Self Maintenance Obsolete Management Pack Alias Detection Rule"

Cheers,

Here are a couple of bugs found with the OpsMgr Self-Maintenance MP’s “OpsMgr Self Maintenance Obsolete Management Pack Alias Detection Rule”:

#1 - Aliases of obsolete MP reference are not being returned. Instead with are presented with an empty set of parenthesis, as in “MP: “Test”, Alias: ()”
#2 - Typo in alert description - “Total nunber of obsolete aliases:” should be “Total number of obsolete aliases:”

#1 could be corrected by replacing the following line in the MP:

$strAlias = "MP: "$MPName“, Alias: $($item.Alias)($($item.ID))”
…with:
$strAlias = "MP: "$MPName“, Alias: $item”

If both the alias AND the MP’s ID are to be returned, also replace the following line in the MP:
[Void]$arrAliasToBeDelete.Add($Alias)
with:
[Void]$arrAliasToBeDelete.Add("$Alias ($RefMPID)")

The above would need to be tested of course!

Regards,

Larry