get-monitoringclass operation

The get-monitoringclass operation retrieves all the monitoring classes that are filtered by the specified search criterion.

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

Adapter request elements for the get-monitoringclass operation

Element

Definition

Required

<operation-name>

Specifies the operation name: get-monitoringclass

Yes

<command-request>

Specifies the parent element for the command elements

Yes

<timeout-secs>

Specifies the duration after which the operation times out

Default value: 60 seconds

No

<command-parameters>

Specifies the parent element for the command parameters

Yes

<filters>

Specifies the parent element that contains the search criterion

No

<filter>

Specifies a particular filter criterion

You can specify more than one search criterion by using multiple <filter> elements.

Conditional; required if <filters> is specified

<monitoringclass-key>

Specifies the name of the monitoring class property used in the search

Conditional; required if the <filters> element is specified

<monitoringclass-val>

Specifies the value of the property specified in the <monitoringclass-key> element

Conditional; required if the <filters> element is specified

<operand>

Specifies the operation that is performed by using the values specified in the <monitoringclass-key> and <monitoringclass-val> elements

Valid values:

  • equals
  • not equals
  • matches

Conditional; required if the <filters> element is specified

 

The following figure illustrates a sample adapter request for the get-monitoringclass operation: 

Sample adapter request for the get-monitoringclass operation

<scom-request>
  <operation-name>get-monitoringclass</operation-name>
  <command-request>
    <timeout-secs>120</timeout-secs>
    <command-parameters>
      <filters>
        <filter>
          <monitoringclass-key>Description</monitoringclass-key>
          <monitoringclass-val>2003</monitoringclass-val>
          <operand>matches</operand>
        </filter>
        <filter>
          <monitoringclass-key>DisplayName</monitoringclass-key>
          <monitoringclass-val>Terminal Server</monitoringclass-val>
          <operand>matches</operand>
        </filter>
      </filters>
    </command-parameters>
  </command-request>
</scom-request>



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

Sample adapter response for the get-monitoringclass operation

<scom-response>
  <metadata>
    <status>success</status>
    <count>1</count>
  </metadata>
  <commands-output>
    <command-output>
      <metadata>
        <command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
        Startup.ps1;get-monitoringclass | where-object {$_.Description -match
         2003} | where-object {$_.DisplayName -match 'Terminal Server'}</command>
        <execution-milliseconds>9203</execution-milliseconds>
        <exit-code>0</exit-code>
        <status>success</status>
        <count>1</count>
      </metadata>
      <output>
        <item>
          <ManagementGroup>CATNoida</ManagementGroup>
          <ManagementGroupId>ae1fcf8a-8088-31d8-93ec-
          90fe77a32d44</ManagementGroupId>
          <Abstract>False</Abstract>
          <Base>ManagementPackElementUniqueIdentifier=89b5cb08-f323-e001-f995-
          0d6227adb443</Base>
          <Hosted>True</Hosted>
          <Singleton>False</Singleton>
          <PropertyCollection>{}</PropertyCollection>
          <XmlTag>ClassType</XmlTag>
          <Accessibility>Public</Accessibility>
          <Name>Microsoft.Windows.Server.2003.TerminalServerRole</Name>
          <Id>fa3a9da3-3735-3b36-bc17-b278a0de047d</Id>
          <DisplayName>Terminal Server 2003 Computer Role</DisplayName>
          <Description>Windows 2003 Computer Systems running Terminal
           Server</Description>
          <LanguageCode>ENU</LanguageCode>
          <Comment />
          <Status>Unchanged</Status>
          <LastModified>1/8/2009 10:32:29 AM</LastModified>
          <TimeAdded>1/8/2009 10:32:29 AM</TimeAdded>
        </item>
      </output>
    </command-output>
  </commands-output>
</scom-response>
Was this page helpful? Yes No Submitting... Thank you

Comments