get-monitoringclassproperty operation

The get-monitoringclassproperty operation retrieves the properties of 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-monitoringclassproperty operation:

Adapter request elements for the get-monitoringclassproperty operation

Element

Definition

Required

<operation-name>

Specifies the operation name: get-monitoringclassproperty

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

<monitoringclass>

Specifies the parent element for elements that identify the monitoring classes for which details are retrieved

Yes

<filters>

Specifies the parent element that contains the search criterion

No

<filter>

Specifies the parent element for a single search criterion

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

Conditional; required if the <filters> element is specified

<monitoringclassproperty-key>

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

Conditional; required if the <filters> element is specified

<monitoringclassproperty-val>

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

Conditional; required if the <filters> element is specified

<operand>

Specifies the operation that is performed by using the values specified in the <monitoringclassproperty-key> and <monitoringclassproperty-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-monitoringclassproperty operation: 

Sample adapter request for the get-monitoringclassproperty operation

<scom-request>
  <operation-name>get-monitoringclassproperty</operation-name>
  <command-request>
    <timeout-secs>120</timeout-secs>
    <command-parameters>
      <monitoringclass>
        <monitoringclass-name>Microsoft.Windows.Computer</monitoringclass-name>
      </monitoringclass>
      <filters>
        <filter>
          <monitoringclassproperty-key>Name</monitoringclassproperty-key>
          <monitoringclassproperty-
          val>ActiveDirectorySite</monitoringclassproperty-val>
          <operand>equals</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-monitoringclassproperty operation

<scom-response>
  <metadata>
    <status>success</status>
    <count>1</count>
  </metadata>
  <commands-output>
    <command-output>
      <metadata>
        <command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
        Startup.ps1;get-monitoringclassproperty -monitoringclass (get-
        monitoringclass -name 'Microsoft.Windows.Computer') | where-object
         {$_.Name -eq 'ActiveDirectorySite'}</command>
        <execution-milliseconds>25859</execution-milliseconds>
        <exit-code>0</exit-code>
        <status>success</status>
        <count>1</count>
      </metadata>
      <output>
        <item>
          <SystemType>System.String</SystemType>
          <ManagementGroup>CATNoida</ManagementGroup>
          <ManagementGroupId>ae1fcf8a-8088-31d8-93ec-90fe77a32d44</ManagementGroupId>
          <Type>string</Type>
          <Key>False</Key>
          <CaseSensitive>False</CaseSensitive>
          <Length>256</Length>
          <MinLength>0</MinLength>
          <Name>ActiveDirectorySite</Name>
          <Id>4a1e1c69-c659-af91-e7a8-d886008032f3</Id>
          <ParentElement>Microsoft.Windows.Computer</ParentElement>
          <DisplayName>Active Directory Site</DisplayName>
          <Description />
          <LanguageCode>ENU</LanguageCode>
        </item>
      </output>
    </command-output>
  </commands-output>
</scom-response>
Was this page helpful? Yes No Submitting... Thank you

Comments