Q: I have a lot of non-English Management Packs loaded in my System Center 2012 Operations Manager  installation. How can I quickly remove them all?

A: If you install Management Packs from the online catalog from within Operations Manager, you need to be very careful to not select high-level Management Pack categories or you could end up installing every country-specific version of the MP. Always select specific Management Packs from the catalog.

As the screen shot shows, if you selected the high level, you would actually end up installing many different country-specific versions. (Below I select the high-level SQL Server 2012.)

opsmgrimportbulk1sml
Ops Manager Bulk Import

If you scroll down, as the screen shot below shows, you will notice that there are all the different locale-specific versions that would also get installed--so you don't want to do this.

opsmgrimportbulk2sml
Ops Manager Bulk Import Expansion

You could manually remove the country-specific Management Packs that end with .<3 letter country code> such as .DEU from within the Operations Manager console; however, this would take a lot of time.

Using Windows PowerShell is the best option. On first investigation,  I thought the following would work:

<code>Get-SCOMManagementPack | where{$_.defaultlanguagecode -notlike "ENU"} | Remove-SCOMManagementPack</code>

However, even the country-specific Management Packs still have a primary language of ENU for some, which you can confirm with this command:

<code>Get-SCOMManagementPack -name "<Management Pack Name>" | format-list</code>

My next thought was to delete all Management Packs whose fourth to last character is a period (.) (assuming then the 3-letter country code).

 <code>PS C:\> Get-SCOMManagementPack | where{($_.Name.Substring($_.Name.Length -4,1) -eq ".")}</code>

However, there are non-country specific Management Packs that meet that criteria:

<br><br>
Sealed    Name                                 DisplayName<br>
------    ----                                 -----------<br>
True      Microsoft.SystemCenter.Apm.Wcf       Operations Manager APM WCF Library<br>
True      Microsoft.SystemCenter.Apm.Web       Operations Manager APM Web<br>
True      Microsoft.SystemCenter.Apm.Library.R Operations Manager APM Library<br>
          esources.enu                         Resources (enu)<br>
True      Microsoft.SystemCenter.WebApplicatio Web Application Availability<br>
          nSolutions.Library.Resources.enu     Monitoring Solutions Library<br>
                                               Resources (enu)

My solution was, therefore, to just create a basic command that specifically checked for the countries and, if found, removed the Management Pack. It's shown below. Run this from within the Operations Manager PowerShell console:

<code>PS C:\> Get-SCOMManagementPack | where{($_.Name.Substring($_.Name.Length -4,4) -eq ".CHS") -or ($_.Name.Substring($_.Name.Length -4,4) -eq ".KOR") -or<strong> </strong>($_.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")} | Remove-SCOMManagementPack</code>