MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.21k stars 21.37k forks source link

Removal of *Advisor* MPs leads one to think they will delete the two built-in Advisor MPs that are supposed to remain behind. #9744

Closed tysonflint closed 6 years ago

tysonflint commented 6 years ago

This command would appear to delete all MPs with the name Advisor in them. Get-SCOMManagementPack -name "Advisor" | Remove-SCOMManagementPack -ErrorAction SilentlyContinue

However there appears to be something built-in in order to protect the built-in Advisor MPs. This can be seen if I don't use the SilentlyContinue switch, and use Continue instead.

I was really worried about the blue warning box in the documentation which says not to delete the Microsoft System Center Advisor or Microsoft System Center Advisor Internal management packs.

The question in my mind was "Why would the documentation tell me to delete all Advisor MPs, then tell me after the command not to delete them?"

I believe the answer is that the command is correct, and will delete all Advisor MPs with the exception of the ones listed in the blue box. This behavior can be seen in the session snippet below, where I delete all Advisor MPs, and am left with the two that the blue box warns me not to delete.

I had no idea that the command would not delete them, and was hoping that this would be the expected behavior. I was just very nervous about issueing the command up front, not knowing if the two MPs that should be left behind would be deleted or not. It appears they are protected from the command, which is what I was hoping to have read within the documentation.

PS E:\> Get-SCOMManagementPack -name "Advisor" | ft -AutoSize   Sealed Name                                                   DisplayName ------ ----                                                   ----------- True   Microsoft.SystemCenter.Advisor.Core                    Microsoft System Center Advisor Core False  Microsoft.SystemCenter.Advisor.SecureReferenceOverride Microsoft System Center Advisor Secure Reference Override True   Microsoft.IntelligencePacks.AdvisorDefaultOverrides True   Microsoft.IntelligencePacks.Advisor.Monitoring         Microsoft System Center Advisor Http Channel Self Monitoring False  Microsoft.SystemCenter.Advisor.GroupDiscovery          Microsoft System Center Advisor Group Discovery True   Microsoft.SystemCenter.Advisor                         Microsoft System Center Advisor True   Microsoft.SystemCenter.Advisor.Resources.ZHH           Microsoft System Center Advisor Resources (ZHH) True   Microsoft.SystemCenter.Advisor.Resources.CHS           Microsoft System Center Advisor Resources (CHS) True   Microsoft.SystemCenter.Advisor.Resources.RUS           Microsoft System Center Advisor Resources (RUS) True   Microsoft.SystemCenter.Advisor.Resources.HUN           Microsoft System Center Advisor Resources (HUN) True   Microsoft.SystemCenter.Advisor.Resources.FRA           Microsoft System Center Advisor Resources (FRA) True   Microsoft.SystemCenter.Advisor.Resources.PTG           Microsoft System Center Advisor Resources (PTG) True   Microsoft.SystemCenter.Advisor.Resources.NLD           Microsoft System Center Advisor Resources (NLD) True   Microsoft.SystemCenter.Advisor.Resources.SVE           Microsoft System Center Advisor Resources (SVE) True   Microsoft.SystemCenter.Advisor.Resources.PTB           Microsoft System Center Advisor Resources (PTB) True   Microsoft.SystemCenter.Advisor.Resources.CHT           Microsoft System Center Advisor Resources (CHT) True   Microsoft.SystemCenter.Advisor.Resources.TRK           Microsoft System Center Advisor Resources (TRK) True   Microsoft.SystemCenter.Advisor.Resources.PLK           Microsoft System Center Advisor Resources (PLK) True   Microsoft.SystemCenter.Advisor.Resources.DEU           Microsoft System Center Advisor Resources (DEU) True   Microsoft.SystemCenter.Advisor.Resources.JPN           Microsoft System Center Advisor Resources (JPN) True   Microsoft.SystemCenter.Advisor.Resources.KOR           Microsoft System Center Advisor Resources (KOR) True   Microsoft.SystemCenter.Advisor.Resources.ITA           Microsoft System Center Advisor Resources (ITA) True   Microsoft.SystemCenter.Advisor.Resources.ESN           Microsoft System Center Advisor Resources (ESN) True   Microsoft.SystemCenter.Advisor.Resources.CSY           Microsoft System Center Advisor Resources (CSY) True   Microsoft.SystemCenter.Advisor.Internal                Microsoft System Center Advisor Internal True   Microsoft.SystemCenter.Advisor.Resources.ENU           Microsoft System Center Advisor Resources (ENU)

PS E:\> Get-SCOMManagementPack -name "Advisor" | Remove-SCOMManagementPack -ErrorAction Continue Remove-SCOMManagementPack : The requested management pack could not be deleted. See inner exception for details. At line:1 char:44


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

vasivara-MSFT commented 6 years ago

@tysonflint Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate.

MGoedtel commented 6 years ago

@tysonflint - Thanks for bringing this to my attention. I bugged this last week after going through these steps in my lab with OpsMgr version 1801 to clean it up, and noticed the behavior is different than what I experienced when testing it against 2012 R2 and 2016 previously. Regardless, you point about calling out the caution of deleting the two core Advisor MPs does need to be addressed, but the worst case all you would have had to do is re-import those MPs from the source media depending on what version of OpsMgr you were working with. #in-progress

MGoedtel commented 6 years ago

@MicahMcKittrick-MSFT - I've bugged this and tracking internally, so I'm requesting we close #please-close this issue.