in

myITforum.com

This Blog

Syndication

1E Blog

Empowering Efficient IT

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:

     
  • 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-object {$_.Name -eq ‘eXcSoftware.nonWindows’

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

    uninstall-managementpack -managementpack $mps

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

Powershell (and the Command Shell) adds a whole new set of functionality to OpsMgr and allows for data mining and scripting that is otherwise unavailable. You can install the OpsMgr command shell on your desktop by running setup.exe from the install media.

Read the complete post at http://www.1e.com/techblog/post/2009/07/07/Uninstalling-a-Management-Pack-using-Powershell.aspx

Published Jul 07 2009, 11:15 AM by 1E Blogs
Filed under:
Copyright - www.myITforum.com, Inc. - 2010 All Rights reserved.
Powered by Community Server (Commercial Edition), by Telligent Systems