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.

get-discovery operation

The get-discovery operation retrieves all the available discoveries. You can filter the result by specifying a filter criterion.

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

Adapter request elements for the get-discovery operation

Element

Definition

Required

<operation-name>

Specifies the operation name: get-discovery

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 the parent element for a single search criterion

Conditional; required if the <filters> element is specified

<discovery-prop-key>

Specifies the name of the discovery entity property used in the search

Valid values:

  • Enabled
  • Name
  • DisplayName
  • Description
  • Category
  • HasNonCategoryOverride
  • Priority
  • ManagementGroup
  • ManagementGroupId
  • Remotable
  • DataSource
  • Id
  • Status
  • LanguageCode
  • XmlTag

Conditional; required if the <filters> element is specified

<discovery-prop-val>

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

Note

When specifying values like true, false, and enabled, enclose them in single quotation marks so that they are treated as strings and not as Boolean entities.

Conditional; required if the <filters> element is specified

<operand>

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

Valid values:

  • equals
  • not equals
  • matches

Conditional; required if the <filters> element is specified

Note

The Name attribute of the Microsoft System Center Operations Manager 2007 application is mapped to the DisplayName attribute of discovery entity in the Microsoft System Center Operations Manager 2007 API.



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

Sample adapter request for the get-discovery operation

<scom-request>
  <operation-name>get-discovery</operation-name>
  <command-request>
    <timeout-secs>120</timeout-secs>
    <command-parameters>
      <filters>
        <filter>
          <discovery-prop-key>Enabled</discovery-prop-key>
          <discovery-prop-val>'true'</discovery-prop-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-discovery operation

<scom-response>
  <metadata>
    <status>success</status>
    <count>1</count>
  </metadata>
  <commands-output>
    <command-output>
      <metadata>
        <command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
        Startup.ps1;get-discovery | where-object {$_.Enabled -eq 'true'}</command>
        <execution-milliseconds>13468</execution-milliseconds>
        <exit-code>0</exit-code>
        <status>success</status>
        <count>90</count>
      </metadata>
      <output>
        <item>
          <ManagementGroup>M1</ManagementGroup>
          <ManagementGroupId>ae1fcf8a-8088-31d8-93ec-90fe77a32d44</ManagementGroupId>
          <HasNonCategoryOverride>False</HasNonCategoryOverride>
          <Enabled>true</Enabled>
          <Target>ManagementPackElementUniqueIdentifier=ea99500d-8d52-fc52-b5a5-
          10dcd1e9d2bd</Target>
          <ConfirmDelivery>True</ConfirmDelivery>
          <Remotable>True</Remotable>
          <Priority>Normal</Priority>
          <Category>Discovery</Category>
          <DataSource>DS</DataSource>
          <DiscoveryClassCollection>{ManagementPackElementUniqueIdentifier=7337a
          aee-2045-5d32-0aa8-fb6e9c58078f}</DiscoveryClassCollection>
          <DiscoveryRelationshipCollection>{}</DiscoveryRelationshipCollection>
          <XmlTag>Discovery</XmlTag>
          <Name>Microsoft.SystemCenter.ACS.Collector.Discovery</Name>
          <Id>5b73d0a7-9eb3-d08f-901e-03e95e1850b4</Id>
          <DisplayName>Microsoft Audit Collection Services Collector Discovery
           Rule</DisplayName>
          <Description>This rule discovers the Microsoft Audit Collection Service
           Collector service</Description>
          <LanguageCode>ENU</LanguageCode>
          <Comment />
          <Status>Unchanged</Status>
          <LastModified>1/8/2009 10:12:53 AM</LastModified>
          <TimeAdded>1/8/2009 10:12:54 AM</TimeAdded>
        </item>
        ...
      </output>
    </command-output>
  </commands-output>
</scom-response>
Was this page helpful? Yes No Submitting... Thank you

Comments