OpsMgr: Uninstalling a Management Pack using Powershell

I recently had the need to uninstall a ManagementPack from OpsMgr without using the Operators Console (kept getting a exception error every time I opened the console after importing the eXcSoftware Management Pack). Here’s how I did it:

    Here’s how I did it:

  • On the RMS, open Command Shell.
  • 080502-Blog Powershell1

     

  • You’ll need to know the name of the MP, so at the powershell prompt type Get-ManagementPack. If [like me] you have a large number of MP’s installed, you’ll probably want to pipe this into a text file, or expand the Screen Buffer Size to something like 3000, run the command and then [right click and select find to] search.
  • 080502-Blog Powershell

  • Once you have the name we can now uninstall the MP. Start by typing the following:

    $MP = Get-ManagementPack :where-opject {$_.Name -eq ‘eXcSoftware.nonWindows’

    We’ve now set the variable $MP to contain the values for the MP. Now type in:

    uninstall-managementpack -managementpack $mp

  • Sadly, there is no confirmation that the MP has been uninstalled. You’ll have to go into the console to confirm.

Thankfully [for me] this did fix my issue. I really must get around to setting up my test OpsMgr environment rather than working live with production.


One response so far, want to say something?

  1. Uninstalling a Management Pack using PowerShell - Rod Trent at myITforum.com says:

    [...] http://blog.lazyindustries.com/opsmgr-uninstalling-a-managementpack-using-powershell/ Published Thursday, July 03, 2008 3:35 PM by rodtrent Filed under: System Center, OpsMgr 2007 [...]

Leave a Reply

IMG_0047IMG_0044IMG_0041IMG_0039IMG_0035IMG_0032Cargo Bay inside ExplorerExplorer AgainExplorerShuttle Launch SimulationSpace Shuttle ExplorerKennedy Space Center