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

**URL:** <https://community.squaredup.com/t/two-bugs-with-opsmgr-self-maintenance-mps-opsmgr-self-maintenance-obsolete-management-pack-alias-detection-rule/1669>\
**Category:** Dashboard Server\
**Tags:** bug, opsmgr-self-maintena\
**Created:** [January 28, 2022, 2:05am UTC](https://community.squaredup.com/t/two-bugs-with-opsmgr-self-maintenance-mps-opsmgr-self-maintenance-obsolete-management-pack-alias-detection-rule/1669 "2022-01-28T02:05:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thesilvercanuck](https://community.squaredup.com/letter_avatar_proxy/v4/letter/t/c2a13f/32.png) [@thesilvercanuck](https://community.squaredup.com/u/thesilvercanuck)\
**Post date:** [January 28, 2022, 2:05am UTC](https://community.squaredup.com/t/two-bugs-with-opsmgr-self-maintenance-mps-opsmgr-self-maintenance-obsolete-management-pack-alias-detection-rule/1669/1 "2022-01-28T02:05:51Z")

</div>

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
