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.

reject-agentpendingaction operation


The reject-agentpendingaction operation rejects the action that is pending with an agent. You can filter the agents by specifying a filter criterion.

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

Adapter request elements for the reject-agentpendingaction operation

The following figure illustrates a sample adapter request for the reject-agentpendingaction operation: 

Sample adapter request for the reject-agentpendingaction operation

<scom-request>
 <operation-name>reject-agentpendingaction</operation-name>
 <command-request>
   <timeout-secs>120</timeout-secs>
   <command-parameters>
     <agent-pending-action>
       <filters>
         <filter>
           <agent-pending-action-key>AgentName</agent-pending-action-key>
           <agent-pending-action-val>abc.neuron.com</agent-pending-action-val>
           <operand>matches</operand>
         </filter>
       </filters>
     </agent-pending-action>
     <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 reject-agentpendingaction operation

<scom-response>
 <metadata>
   <status>success</status>
   <count>1</count>
 </metadata>
 <commands-output>
   <command-output>
     <metadata>
       <command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
       Startup.ps1;reject-agentpendingaction
       -agentpendingaction (get-agentpendingaction | where-object {$_.AgentName
        -match 'abc.neuron.com'})
       -whatif</command>
       <execution-milliseconds>3313</execution-milliseconds>
       <exit-code>0</exit-code>
       <status>success</status>
       <count>0</count>
     </metadata>
     <output>
       <line>What if: Performing operation "Reject-AgentPendingAction" on Target
        "abc.neuron.com".</line>
     </output>
   </command-output>
 </commands-output>
</scom-response>

 

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