When you go to add Management Packs (MPs) to System Center Operations Manager, there is that temptation to be lazy and just add everything. This will clog your environment with a lot of things you do not need… including MPs in languages that you likely do not speak, read, or care about (within the context of your SCOM environment).
Once you realize this is a lousy idea, it is usually too late… you’ve already done it. You will want to clear out a lot of things… starting with those foreign languages.
You can delete them one by one of course… right-click on the MP, click Remove (or Delete). This will be reasonably time consuming… so when this happened to me some time ago, I went looking online for a better solution.
John Savill, an IT writer and Microsoft MVP whom I have known and respected for many years, created a great script that I found. I found it again recently in an article he wrote for IT Pro Today. Essentially, it removes every MP that has a geo-tag (.KOR for Korean, .ITA for Italian, and so forth).
From the Operations Manager Shell, enter (or cut and paste) the following:
Get-SCOMManagementPack | where{($_.Name.Substring($_.Name.Length -4,4) -eq “.CHS”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.KOR”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.CHT”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.ITA”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.JPN”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.RUS”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.FRA”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.PTB”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.DEU”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.ESN”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.HUN”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.NLD”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.PLK”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.PTG”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.SVE”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.TRK”) -or ($_.Name.Substring($_.Name.Length -4,4) -eq “.CSY”)} | Remove-SCOMManagementPack
(Note: John’s original script excluded a number of languages; I have modified the script to include Hungarian, Dutch, Polish, Portuguese, Swedish, Turkish, and Czech. I do not know if these are languages that were added to Management Packs recently, but I found several with these and wanted to remove them as well.)
Depending on how many foreign language MPs you have, it might take some time… After all, it is going through and removing them individually the same way that you would… but without having to right-click, click, confirm, repeat. So be patient… it is working!
(Note: While it is working, you will not be able to access the Operations Console… at least, not from the same system you are running the script on.)
The article I found it in is here, and while it was originally written for SCOM 2012, it works just as well for SCOM 2016.
Thanks John!
Leave a Reply