get-agent operation

The get-agent operation retrieves the agents associated with the Microsoft System Center Operations Manager 2007 management server. You can filter the result by specifying a filter criterion.

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

Adapter request elements for get-agent operation

Element

Definition

Required

<operation-name>

Specifies the operation name: get-agent

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

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

Conditional; required if the <filters> element is specified

<agent-prop-key>

Specifies the name of the agent's property used in the search

Valid values:

  • PrimaryManagementServerName
  • InstalledBy
  • ManuallyInstalled
  • Version
  • ActionAccountIdentity
  • Name
  • Id
  • DisplayName
  • HostComputer
  • HostedHealthService
  • HealthState
  • PrincipalName
  • NetworkName
  • ComputerName
  • Domain
  • RequestCompression
  • CommunicationPort
  • ManuallyInstalled
  • AuthenticationName
  • HeartbeatInterval

Conditional; required if the <filters> element is specified

<agent-prop-val>

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

Conditional; required if the <filters> element is specified

<operand>

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

Sample adapter request for the get-agent operation

<scom-request>
  <operation-name>get-agent</operation-name>
  <command-request>
    <timeout-secs>120</timeout-secs>
    <command-parameters>
      <filters>
        <filter>
          <agent-prop-key>InstalledBy</agent-prop-key>
          <agent-prop-val>SYNAPSE\viky.john</agent-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-agent operation

<scom-response>
  <metadata>
    <status>success</status>
    <count>1</count>
  </metadata>
  <commands-output>
    <command-output>
      <metadata>
        <command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
        Startup.ps1;get-agent-managementserver ((get-managementserver)) | where-
        object {$_.InstalledBy -eq 'SYNAPSE\james.calvin'}</command>
        <execution-milliseconds>10109</execution-milliseconds>
        <exit-code>0</exit-code>
        <status>success</status>
        <count>1</count>
      </metadata>
      <output>
        <item>
          <PrimaryManagementServerName>win2stdvm.neuron.com</PrimaryManagementServerName>
          <Id>0a22072a-33d1-bf7b-bcbb-e77354971e26</Id>
          <LastModified>2/4/2009 1:42:29 PM</LastModified>
          <Name>win1stdvm.neuron.com</Name>
          <DisplayName>win1stdvm.neuron.com</DisplayName>
          <HostComputer>win1stdvm.neuron.com</HostComputer>
          <HostedHealthService>win1stdvm.neuron.com</HostedHealthService>
          <HealthState>Warning</HealthState>
          <PrincipalName>win1stdvm.neuron.com</PrincipalName>
          <NetworkName>win1stdvm.neuron.com</NetworkName>
          <ComputerName>win1stdvm</ComputerName>
          <Domain>SYNAPSE</Domain>
          <IPAddress>172.11.11.111</IPAddress>
          <Version>6.0.6278.0</Version>
          <RequestCompression>True</RequestCompression>
          <CommunicationPort>5723</CommunicationPort>
          <MaximumSizeOfAllTransferredFilesBytes>0</MaximumSizeOfAllTransferredFilesBytes>
          <MaximumQueueSizeBytes>104857600</MaximumQueueSizeBytes>
          <ManuallyInstalled>False</ManuallyInstalled>
          <InstallTime>1/8/2009 1:04:58 PM</InstallTime>
          <InstalledBy>SYNAPSE\james.calvin</InstalledBy>
          <CreateListener>False</CreateListener>
          <AuthenticationName />
          <ActionAccountIdentity>james.calvin</ActionAccountIdentity>
          <HeartbeatInterval>60</HeartbeatInterval>
          <ProxyingEnabled>False</ProxyingEnabled>
          <ManagementGroup>M1</ManagementGroup>
          <ManagementGroupId>00000000-0000-0000-0000-000000000000</ManagementGroupId>
        </item>
      </output>
    </command-output>
  </commands-output>
</scom-response>
Was this page helpful? Yes No Submitting... Thank you

Comments