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


The get-managementpack operation retrieves all the management packs that are filtered by the specified search criterion.

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

Adapter request elements for the get-managementpack operation

Note

The following naming discrepancies exist between the Microsoft System Center Operations Manager 2007 application and API:

  • The ID attribute of the application is mapped to the Name attribute of the management pack in the API.
  • The Name attribute of the application is mapped to the DisplayName attribute of the management pack in the API.


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

Sample adapter request for the get-managementpack operation

<scom-request>
 <operation-name>get-managementpack</operation-name>
 <command-request>
   <timeout-secs>120</timeout-secs>
   <command-parameters>
     <filters>
       <filter>
         <managementpack-prop-key>Sealed</managementpack-prop-key>
         <managementpack-prop-val>true</managementpack-prop-val>
         <operand>equals</operand>
       </filter>
       <filter>
         <managementpack-prop-key>DisplayName</managementpack-prop-key>
         <managementpack-prop-val>Health</managementpack-prop-val>
         <operand>matches</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-managementpack operation

<scom-response>
 <metadata>
   <status>success</status>
   <count>1</count>
 </metadata>
 <commands-output>
   <command-output>
     <metadata>
       <command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
       Startup.ps1;get-managementpack | where-object {$_.Sealed -eq $True} |
        where-object {$_.DisplayName -match 'Health'}</command>
       <execution-milliseconds>5250</execution-milliseconds>
       <exit-code>0</exit-code>
       <status>success</status>
       <count>2</count>
     </metadata>
     <output>
       <item>
         <Name>System.Health.Internal</Name>
         <TimeCreated>1/8/2009 10:13:09 AM</TimeCreated>
         <LastModified>1/8/2009 10:13:09 AM</LastModified>
         <KeyToken>31bf3856ad364e35</KeyToken>
         <Version>6.0.6278.0</Version>
         <Id>9395a1eb-6322-1c8b-71ad-7ab6955c7e11</Id>
         <VersionId>a55ebf8e-6400-bd52-4b94-4128f736e499</VersionId>
         <References>{System.Library, System.Health.Library}</References>
         <Sealed>True</Sealed>
         <ContentReadable>False</ContentReadable>
         <FriendlyName>System Health Internal Library</FriendlyName>
         <DisplayName>Health Internal Library</DisplayName>
         <Description>System Health Interal Library: This Management Pack
          contains definitions for the System Health types that are no visible
          via the UI or the SDK client.</Description>
         <DefaultLanguageCode>ENU</DefaultLanguageCode>
         <LockObject>System.Object</LockObject>
       </item>
       <item>
         <Name>System.Health.Library</Name>
         <TimeCreated>1/8/2009 10:11:47 AM</TimeCreated>
         <LastModified>1/8/2009 10:11:47 AM</LastModified>
         <KeyToken>31bf3856ad364e35</KeyToken>
         <Version>6.0.6278.0</Version>
         <Id>0abff86f-a35e-b08f-da0e-ff051ab2840c</Id>
         <VersionId>9fe93a57-4b34-578e-c3bd-c649ac2de94f</VersionId>
         <References>{System.Library}</References>
         <Sealed>True</Sealed>
         <ContentReadable>True</ContentReadable>
         <FriendlyName>System Health Library</FriendlyName>
         <DisplayName>Health Library</DisplayName>
         <Description>System Health Library: This Management Pack contains
          definitions for the core System Health types.</Description>
         <DefaultLanguageCode>ENU</DefaultLanguageCode>
         <LockObject>System.Object</LockObject>
       </item>
        ...
     </output>
   </command-output>
 </commands-output>
</scom-response>

 

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