Hi,
I need to close all the New and critical alerts from the console every one hour. becuase no one is looking at the console in my setup. So i write a rule through Auth console in this way.
get-alert -criteria ‘ResolutionState = ''0'' AND IsMonitorAlert = ''False''’| resolve-alert -comment 'Closing New alerts through script' | out-null
Once i imported i got the below script error in teh ops console. I am thinking that i missed something when i wrote the rule. COuld you please point what went wrong in the script?
The Event Policy for the process started at 4:45:00 PM has detected errors in the output. The 'ExitCode' policy expression:
[^0]+
matched the following output:
1
Thanks in Advance,
Fidelis
Create New Rule --> Timed COmmand --> command --> and pasted the below powershell script as CloseAlert.PS1 and imported the MP .