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 |
---|---|---|
|
Specifies the operation name: |
Yes |
|
Specifies the parent element for the command elements |
Yes |
|
Specifies the duration after which the operation times out |
No |
|
Specifies the parent element for the command parameters |
Yes |
|
Specifies the parent element that contains the search criterion |
No |
|
Specifies the parent element for a single search criterion |
Conditional; required if the |
|
Specifies the name of the agent's property used in the search
|
Conditional; required if the |
|
Specifies the value of the property specified in the |
Conditional; required if the |
|
Specifies the operation that is performed by using the values specified in the
|
Conditional; required if the |
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>
Comments