Unsupported content This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

resolve-alert operation


The resolve-alert operation resolves alerts that are filtered by the specified search criterion.

The following table describes the <items> XML and request elements for the resolve-alert operation:

Adapter request elements for the resolve-alert operation

The following figure illustrates a sample adapter request for the resolve-alert operation:

Sample adapter request for the resolve-alert operation

<scom-request>
 <operation-name>resolve-alert</operation-name>
 <command-request>
   <timeout-secs>120</timeout-secs>
   <command-parameters>
     <alert>
       <alert-search-criteria>
         <criteria-expression>
           <key>TicketId</key>
           <value>ABC-1002</value>
           <operator>equals</operator>
         </criteria-expression>
       </alert-search-criteria>
     </alert>
     <comment>
       <resolve-alert-comment>Resolving Alert</resolve-alert-comment>
     </comment>
     <preview>true</preview>
   </command-parameters>
 </command-request>
</scom-request>


The following figure illustrates the adapter response for the sample request:

Sample adapter response for the resolve-alert operation

<scom-response>
 <metadata>
   <status>success</status>
   <count>1</count>
 </metadata>
 <commands-output>
   <command-output>
     <metadata>
       <command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
       Startup.ps1;(get-alert -criteria {TicketId = 'ABC-1002'}) | resolve-alert
        -comment 'Resolving Alert' -whatif</command>
       <execution-milliseconds>4375</execution-milliseconds>
       <exit-code>0</exit-code>
       <status>success</status>
       <count>0</count>
     </metadata>
     <output>
       <line>What if: Performing operation "Resolve-Alert" on Target "4c392087-
       6b0d-4e70-9270-6ccf29a79b36".</line>
     </output>
   </command-output>
 </commands-output>
</scom-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*