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.

export-managementpack operation


The export-managementpack operation exports a management pack to a file.

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

Adapter request elements for the export-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 figures illustrate sample adapter requests for the export-managementpack operation: 

Sample adapter request for the export-managementpack operation (Format 1)

<scom-request>
 <operation-name>export-managementpack</operation-name>
 <command-request>
   <timeout-secs>120</timeout-secs>
   <command-parameters>
     <managementpack>
       <filters>
         <filter>
           <managementpack-prop-key>Sealed</managementpack-prop-key>
           <managementpack-prop-val>$false</managementpack-prop-val>
           <operand>equals</operand>
         </filter>
       </filters>
     </managementpack>
     <export-path>C:\packs</export-path>
   </command-parameters>
 </command-request>
</scom-request>

Sample adapter request for the export-managementpack operation (Format 2)

<scom-request>
 <operation-name>export-managementpack</operation-name>
 <command-request>
   <timeout-secs>120</timeout-secs>
   <command-parameters>
     <managementpack>
       <managementpack-id>66de9512-d446-f46b-bb85-197ec864f1f7</managementpack-id>
     </managementpack>
     <export-path>C:\packs</export-path>
   </command-parameters>
 </command-request>
</scom-request>

Sample adapter request for the export-managementpack operation (Format 3)

<scom-request>
 <operation-name>export-managementpack</operation-name>
 <command-request>
   <timeout-secs>120</timeout-secs>
   <command-parameters>
     <managementpack>
       <managementpack-name>Microsoft.Windows.Client.BusinessCritical</managementpack-name>
     </managementpack>
     <export-path>C:\packs</export-path>
   </command-parameters>
 </command-request>
</scom-request>


The following figures illustrate the adapter response for the sample requests: 

Sample adapter response for the export-managementpack operation (Format 1)

<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 '$false'})
        | export-managementpack -path 'C:\packs'</command>
       <execution-milliseconds>39078</execution-milliseconds>
       <exit-code>0</exit-code>
       <status>success</status>
       <count>0</count>
     </metadata>
     <output />
   </command-output>
 </commands-output>
</scom-response>

Sample adapter response for the export-managementpack operation (Format 2)

<scom-response>
 <metadata>
   <status>success</status>
   <count>1</count>
 </metadata>
 <commands-output>
   <command-output>
     <metadata>
       <command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
       Startup.ps1;(get-managementpack -id 66de9512-d446-f46b-bb85-
       197ec864f1f7) | export-managementpack -path 'C:\packs'</command>
       <execution-milliseconds>4844</execution-milliseconds>
       <exit-code>0</exit-code>
       <status>success</status>
       <count>0</count>
     </metadata>
     <output />
   </command-output>
 </commands-output>
</scom-response>

Sample adapter response for the export-managementpack operation (Format 3)

<scom-response>
 <metadata>
   <status>success</status>
   <count>1</count>
 </metadata>
 <commands-output>
   <command-output>
     <metadata>
       <command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
       Startup.ps1;(get-managementpack -name
        Microsoft.Windows.Client.BusinessCritical) | export-managementpack -path
        'C:\packs'</command>
       <execution-milliseconds>4859</execution-milliseconds>
       <exit-code>0</exit-code>
       <status>success</status>
       <count>0</count>
     </metadata>
     <output />
   </command-output>
 </commands-output>
</scom-response>

 

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