Uninstalling Connection Center

Hopefully you won’t need to uninstall Connection Center, but on the off chance you do, this page has you covered.

Removing Dependent management packs

Firstly you’ll need to remove any dependent management packs. These are usually just management packs with configuration in them.

The easiest way to do this is to just try and remove Connection Center which will get you a list.

Personally, I prefer to do this bit in PowerShell, as the inner exception gives you a list that you can manipulate easily:

Get-SCOMManagementPack -Name Cookdown.ConnectionCenter | Remove-SCOMManagementPack
Remove-SCOMManagementPack : The requested management pack could not be deleted. See inner exception for details.
At line:1 char:58
+ ... ementPack -Name Cookdown.ConnectionCenter | Remove-SCOMManagementPack
+                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Microsoft.Syste...mentPackCommand:RemoveSCManagementPackCommand) [Remove-
   SCManagementPack], InvalidOperationException
    + FullyQualifiedErrorId : ExecutionError,Microsoft.SystemCenter.Core.Commands.RemoveSCManagementPackCommand

Management pack 470014f2-8d9f-8674-3c16-4ad9b0f9952d cannot be uninstalled. Number of management packs that have
references to this management pack: [ID=Microsoft.SystemCenter.SecureReferenceOverride, Version=7.3.13142.0, KeyToken=]
[ID=Cookdown.ConnectionCenter.Configuration, Version=, KeyToken=]

A quick copy and paste, or some RegEx voodoo and you’ve got yourself a list that you can just feed back into PowerShell or work your way through in the UI.

Remove each of the management packs other than the SecureReferenceOverride Management pack (which we deal with in the next step).

Removing RunAs configuration and secure references

Next, you’ll need to remove the association of any Run As account with a Run As profile. So far I’ve only managed this through the UI. Check each cooldown Run As profile and remove any associations with a Run As account. You may also want to remove the Run As accounts at this stage, but this isn’t required.

Next, you need to remove the reference from the Secure Reference Management Pack to Connection Center.

There are multiple ways of doing this. Usually, it comes down to exporting the file, removing the reference from the XML, and re-importing it. I tend to favor doing this with PowerShell.

$SecureReferenceMP = Get-SCOMManagementPack -Name 'Microsoft.SystemCenter.SecureReferenceOverride'
PS C:\> $SecureReferenceMP.References

Key              Value
---              -----
SystemCenter     ManagementPack:[Name=Microsoft.SystemCenter.DataWarehouse.Internal, KeyToken=31bf3856ad364e35, Vers...
SystemCenter1    ManagementPack:[Name=Microsoft.SystemCenter.DataWarehouse.Library, KeyToken=31bf3856ad364e35, Versi...
ConnectionCenter ManagementPack:[Name=Cookdown.ConnectionCenter, KeyToken=69507b02e96d43f0, Version=]
SQLServer1       ManagementPack:[Name=Microsoft.SQLServer.Core.Library, KeyToken=31bf3856ad364e35, Version=]
SQLServer        ManagementPack:[Name=Microsoft.SQLServer.Generic.Presentation, KeyToken=31bf3856ad364e35, Version=7...
System           ManagementPack:[Name=System.Library, KeyToken=31bf3856ad364e35, Version=7.5.8501.0]
SystemCenter2    ManagementPack:[Name=Microsoft.SystemCenter.Library, KeyToken=31bf3856ad364e35, Version=7.0.8438.6]
Unix             ManagementPack:[Name=Microsoft.Unix.Library, KeyToken=31bf3856ad364e35, Version=7.7.1136.0]

PS C:\> $SecureReferenceMP.References.Remove('ConnectionCenter')
PS C:\> $SecureReferenceMP.Verify()
PS C:\> $SecureReferenceMP.AcceptChanges()

If you get an exception at the verify step. Stop and deal with the issue.

You’ve probably missed a Run As Profile. Abort and start again.

Removing Connection Center

Finally, you can just remove the Connection Center MP as normal.

Further Reading and Next Steps

Hopefully, you’ll want to go back to Install Connection Center, hint hint, nudge nudge.

Otherwise Matthew Long has a great write-up of removing secure references using PowerShell here.