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-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

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>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*