Hi,
I have the following situation. We created a connection with our ticketing system (not Service Manager). When somebody closes a ticket it which is generated by SCOM this is what happens:
First of all it checks if it's a rule or a monitor:
Import-Module OperationsManager
New-SCOMManagementGroupConnection -ComputerName:scom01
$alert = Get-SCOMAlert -Id {Query result from "Check AlertId"}
$IsMonitorAlert=$alert.IsMonitorAlert
If the output from $isMonitorAlert is false (so it's a rule), then the SCOM alert will be closed. But when the output is true (so it's a monitor) it checks if the health state is "healthy" or "warning/error". If it's not "healthy"
the ticket will be re-opened.
Now this works almost perfectly, except for manual reset monitors. If a operator solves the issue, and closes the ticket it will be re-opened because it is a monitor, but it's still in a error state because it has to be reset manually.
I would like to automate this with a powershell script, but I don't know how to recognize manual reset monitors with Powershell. Any suggestions?