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
The following figures illustrate sample adapter requests for the export-managementpack operation:
Sample adapter request for the export-managementpack operation (Format 1)
<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)
<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)
<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)
<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)
<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)
<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>