locked
Poweshell command to list all the sealed mp's RRS feed

  • Question

  • Hi

    I need to list all the sealed Mp's in the environment.Please help us with the powershell command.


    Note: I want to list in a excel file with the sealed mp names. I do not want to backup the sealed mp's)


    Donald D'souza (http://donald-scom.blogspot.com/)

    Monday, June 18, 2012 5:27 PM

Answers

  • Hi

    This works for SCOM 2012 and exports the sealed MP into a CSV file. This you can import into Excel.

    Get-SCOMManagementPack  | Where-Object {$_.sealed -eq "true"} |  Export-Csv c:\temp\sealed.csv

    You have to execute this command in the Operations Manager Shell
    • Edited by Stefan RothMVP Monday, June 18, 2012 10:15 PM
    • Marked as answer by Yog Li Thursday, June 28, 2012 8:40 AM
    Monday, June 18, 2012 10:14 PM

All replies

  • Hi

    This works for SCOM 2012 and exports the sealed MP into a CSV file. This you can import into Excel.

    Get-SCOMManagementPack  | Where-Object {$_.sealed -eq "true"} |  Export-Csv c:\temp\sealed.csv

    You have to execute this command in the Operations Manager Shell
    • Edited by Stefan RothMVP Monday, June 18, 2012 10:15 PM
    • Marked as answer by Yog Li Thursday, June 28, 2012 8:40 AM
    Monday, June 18, 2012 10:14 PM
  • Did it work?
    Tuesday, June 19, 2012 11:55 AM
  • This will require you to have a folder called "C:\mp" to store the exported management packs so make sure you create the folder first.

    For SCOM 2007:

    $mps = Get-ManagementPack | where {$_.sealed –eq $true}
    foreach($mp in $mps)
    {export-managementpack -ManagementPack $mp -Path "C:\mp"}

    For SCOM 2012:

    $mps = Get-SCOMManagementPack | where {$_.sealed –eq $true}
    foreach($mp in $mps)
    {Export-SCOManagementPack -ManagementPack $mp -Path "C:\mp"}

    Hope this helps.

    Regards,
    Ravi

    • Marked as answer by Yog Li Thursday, June 28, 2012 8:40 AM
    • Unmarked as answer by Donald Dsouza Thursday, June 28, 2012 1:06 PM
    Wednesday, June 27, 2012 1:11 PM
  • Hi Stefan

    The powershell command you have provided worked. Thanks


    Donald D'souza (http://donald-scom.blogspot.com/)

    Thursday, June 28, 2012 1:07 PM