How to export all rules and monitors from SCOM 2007 management group

D D 6 Reputation points
2022-05-02T16:39:01.53+00:00

Hello,

How can I export all rules and monitors from SCOM 2007. I use the powershell script from Kevin Holman to export all rules and monitors from SCOM 2019 but for 2007 its powershell v1 and the script cannot be used. I used to do it in the past but I forgot how it was done. Was there a SQL query or any other way . I need to export all rules and monitors to CSV from a 2007 management group.

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,443 questions
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Andrew Blumhardt 9,841 Reputation points Microsoft Employee
    2022-05-02T17:56:54.383+00:00

    Only unsealed MPs can be exported as complete MP files if your goal is a restorable backup. In that case you need to maintain a copy of your original MP files. Old versions may not be available for download when you need them.

    It was something like Get-SCOMManagementPack | Export-SCOMManagementpack -Path "C:\Management Packs". Though the commands have changed since then. Try using help or dropping the "SCOM" from the commands above. Only the unsealed files created will be importable.

    There should be a PowerShell command if you simply want to create a CSV listing. Get-SCOMMonitor | Export-Csv -Path Monitors.csv

    0 comments No comments

  2. D D 6 Reputation points
    2022-05-02T19:10:14.403+00:00

    Thank you Andrew !

    get-monitor and get-rule are both commands. That's good but do you remember if there was a nice powershell script which created the CSV report for you shows which rule or monitor to which management pack belongs ? Was there something better besides these two commands ?

    0 comments No comments

  3. Andrew Blumhardt 9,841 Reputation points Microsoft Employee
    2022-05-02T19:54:02.21+00:00

    Not that I recall but maybe someone else here remembers. :-)

    0 comments No comments

  4. CyrAz 5,181 Reputation points
    2022-05-02T21:27:04.543+00:00

    It should be fairly easy to adapt Kevin's script you mention in first post...

    0 comments No comments

  5. George Moise 2,351 Reputation points Microsoft Employee
    2022-05-03T06:16:52.323+00:00

    Hi @D D ,

    If you want to get just some basic details about Monitors and Rules, you could also try with the following SQL Queries (I don't remember if anything was changed in the Schema of these tables since 2007):

    Monitors:
    select m.MonitorName, m.MonitorCategory,m.AlertSeverity, lt.LanguageCode,lt.LTValue,mp.MPFriendlyName as MPName, MP.MPVersion from Monitor m
    Inner join LocalizedText LT on LT.ElementName = m.MonitorName
    Inner join ManagementPack mp on m.ManagementPackId = mp.ManagementPackId
    where lt.LanguageCode = 'ENU'

    Rules:
    Select R.RuleName, R.RuleCategory, LT.LTValue, MP.MPFriendlyName, MP.MPVersion from Rules R
    Inner join LocalizedText LT on LT.ElementName = R.RuleName
    Inner join ManagementPack MP on R.ManagementPackId = MP.ManagementPackId
    Where LT.LanguageCode = 'ENU'

    I hope it helps!
    BR,
    George

    0 comments No comments