Get a List of Management Pack Rules with PowerShell
Published Feb 14 2019 07:51 PM 198 Views
First published on TECHNET on Aug 01, 2007

Did you know you can use PowerShell to create an Excel list of all of the rules in your imported Management Packs? It's pretty easy -- just follow these steps:



  1. On your Management Server, open the Command Shell by clicking Programs -> System Center -> Command Shell .

  2. In the command window, type:
    get-rule | select-object @{Name="MP";Expression={ foreach-object {$_.GetManagementPack().DisplayName }}},DisplayName |

    sort-object -property MP | export-csv "c:\rules.csv"


Open the file C:\rules.csv in Excel and expand out the first column to get a view like this (click for larger picture):




The export-csv cmdlet that the output is piped into is a handy one to know about. You can use it to use to put information extracted with PowerShell into a comma separated format that can be read by Excel.



[Edit: Updated first line to clarify that this outputs rules for Management Packs that are already imported and to include link to larger picture.]

Version history
Last update:
‎Mar 11 2019 07:56 AM
Updated by: