get-event operation
The get-event operation retrieves events that are filtered by the specified search criterion.
The following table describes the <items> XML and request elements for the get-event operation:
Adapter request elements for the get-event operation
The following figure illustrates a sample adapter request for the get-event operation:
Sample adapter request for the get-event operation
<scom-request>
<operation-name>get-event</operation-name>
<command-request>
<timeout-secs>120</timeout-secs>
<command-parameters>
<event-search-criteria>
<criteria-expression>
<key>Id</key>
<value>d6da42ec-da39-491e-afcb-9c2ee192923d</value>
<operator>equals</operator>
</criteria-expression>
</event-search-criteria>
<isrecurse>true</isrecurse>
</command-parameters>
</command-request>
</scom-request>
<operation-name>get-event</operation-name>
<command-request>
<timeout-secs>120</timeout-secs>
<command-parameters>
<event-search-criteria>
<criteria-expression>
<key>Id</key>
<value>d6da42ec-da39-491e-afcb-9c2ee192923d</value>
<operator>equals</operator>
</criteria-expression>
</event-search-criteria>
<isrecurse>true</isrecurse>
</command-parameters>
</command-request>
</scom-request>
The following figure illustrates the adapter response for the sample request:
Sample adapter response for the get-event operation
<scom-response>
<metadata>
<status>success</status>
<count>1</count>
</metadata>
<commands-output>
<command-output>
<metadata>
<command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
Startup.ps1;get-event -criteria {Id = 'd6da42ec-da39-491e-afcb-
9c2ee192923d'} -recurse</command>
<execution-milliseconds>4156</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
<count>1</count>
</metadata>
<output>
<item>
<Id>d6da42ec-da39-491e-afcb-9c2ee192923d</Id>
<OriginalId>09784b06-1b99-4c54-b4e5-d809f1f2a71f</OriginalId>
<MonitoringObjectId>adb901fe-08f4-490e-722f-d65430015064</MonitoringObjectId>
<MonitoringClassId>ab4c891f-3359-3fb6-0704-075fbfe36710</MonitoringClassId>
<MonitoringObjectName />
<MonitoringObjectDisplayName>win2stdvm.neuron.com</MonitoringObjectDisplayName>
<MonitoringObjectPath>win2stdvm.neuron.com</MonitoringObjectPath>
<MonitoringObjectFullName>win2stdvm.neuron.com</MonitoringObjectFullName>
<MonitoringRuleId>fe17ed88-9f59-8b80-b1a5- ee42b80b95c8</MonitoringRuleId>
<MonitoringRuleDisplayName>Collect Distributed Workflow Test
Event</MonitoringRuleDisplayName>
<MonitoringRuleDescription>Collects events logged by the "Log
Distributed Workflow Test Event" rule</MonitoringRuleDescription>
<PublisherName>Health Service Script</PublisherName>
<Number>6022</Number>
<Description>LogEndToEndEvent.js : This event is logged to the Windows
Event Log periodically to test a event collection.</Description>
<CategoryId>0</CategoryId>
<Category />
<User>N/A</User>
<Channel>Operations Manager</Channel>
<LevelId>4</LevelId>
<Level />
<LoggingComputer>WIN2STDVM</LoggingComputer>
<EventData />
<Parameters>{LogEndToEndEvent.js, This event is logged to the Windows
Event Log periodically to test a event collection.}</Parameters>
<TimeGenerated>3/24/2009 8:45:00 AM</TimeGenerated>
<TimeAdded>3/24/2009 8:45:30 AM</TimeAdded>
<ManagementGroup>M1</ManagementGroup>
<ManagementGroupId>ae1fcf8a-8088-31d8-93ec-90fe77a32d44</ManagementGroupId>
</item>
</output>
</command-output>
</commands-output>
</scom-response>
<metadata>
<status>success</status>
<count>1</count>
</metadata>
<commands-output>
<command-output>
<metadata>
<command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
Startup.ps1;get-event -criteria {Id = 'd6da42ec-da39-491e-afcb-
9c2ee192923d'} -recurse</command>
<execution-milliseconds>4156</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
<count>1</count>
</metadata>
<output>
<item>
<Id>d6da42ec-da39-491e-afcb-9c2ee192923d</Id>
<OriginalId>09784b06-1b99-4c54-b4e5-d809f1f2a71f</OriginalId>
<MonitoringObjectId>adb901fe-08f4-490e-722f-d65430015064</MonitoringObjectId>
<MonitoringClassId>ab4c891f-3359-3fb6-0704-075fbfe36710</MonitoringClassId>
<MonitoringObjectName />
<MonitoringObjectDisplayName>win2stdvm.neuron.com</MonitoringObjectDisplayName>
<MonitoringObjectPath>win2stdvm.neuron.com</MonitoringObjectPath>
<MonitoringObjectFullName>win2stdvm.neuron.com</MonitoringObjectFullName>
<MonitoringRuleId>fe17ed88-9f59-8b80-b1a5- ee42b80b95c8</MonitoringRuleId>
<MonitoringRuleDisplayName>Collect Distributed Workflow Test
Event</MonitoringRuleDisplayName>
<MonitoringRuleDescription>Collects events logged by the "Log
Distributed Workflow Test Event" rule</MonitoringRuleDescription>
<PublisherName>Health Service Script</PublisherName>
<Number>6022</Number>
<Description>LogEndToEndEvent.js : This event is logged to the Windows
Event Log periodically to test a event collection.</Description>
<CategoryId>0</CategoryId>
<Category />
<User>N/A</User>
<Channel>Operations Manager</Channel>
<LevelId>4</LevelId>
<Level />
<LoggingComputer>WIN2STDVM</LoggingComputer>
<EventData />
<Parameters>{LogEndToEndEvent.js, This event is logged to the Windows
Event Log periodically to test a event collection.}</Parameters>
<TimeGenerated>3/24/2009 8:45:00 AM</TimeGenerated>
<TimeAdded>3/24/2009 8:45:30 AM</TimeAdded>
<ManagementGroup>M1</ManagementGroup>
<ManagementGroupId>ae1fcf8a-8088-31d8-93ec-90fe77a32d44</ManagementGroupId>
</item>
</output>
</command-output>
</commands-output>
</scom-response>
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*