Search This Blog

Thursday, January 12, 2012

Removing SCOM 2012 Management Packs Through Powershell

I got a little overzealous in importing management packs and found myself with a number of management packs that I did not want in my library. Going through one by one and selecting delete from the management window was going to be a nightmare. Enclosed is a powershell script I found and used to remove the various packs I imported. In this case, the management packs had country code extensions, such as .RUS or .KOR, that I didn't need for my installation. I will say, while this reduces the manual nightmare, the process takes exceptionally long, especially when using multiple search strings.

Get-SCManagementPack ?{ $ -match ".RUS" } Remove-SCOMManagementPack

In some cases, you might want to delete multiple types of management packs. I've included an example of one using the "logical or" operation.

Get-SCManagementPack ?{ $ -match ".CHT" -or ".JPN" } Remove-SCOMManagementPack

No comments:

Post a Comment