uninstall-managementpack operation

The uninstall-managementpack operation uninstalls the specified management pack from the Microsoft System Center Operations Manager 2007 management server.

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

Adapter request elements for the uninstall-managementpack operation

Element

Definition

Required

<operation-name>

Specifies the operation name: uninstall-managementpack

Yes

<command-request>

Specifies the parent element for the command elements

Yes

<timeout-secs>

Specifies the duration after which the operation times out

Default value: 60 seconds

No

<command-parameters>

Specifies the parent element for the command parameters

Yes

<managementpack>

Specifies the parent element for the <managementpack-name> element

Yes

<managementpack-name>

Specifies the name of the management pack that you want to uninstall

Yes

<preview>

Specifies whether you want to preview the results of the operation

Valid values:

  • true: Indicates that you want to preview the results of the operation
  • false: Indicates that the operation is executed without displaying the results of the execution (default)

No

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

Sample adapter request for the uninstall-managementpack operation

<scom-request>
  <operation-name>uninstall-managementpack</operation-name>
  <command-request>
    <timeout-secs>120</timeout-secs>
    <command-parameters>
      <managementpack>
        <managementpack-name>Microsoft.Windows.Client.BusinessCritical</managementpack-name>
      </managementpack>
      <preview>true</preview>
    </command-parameters>
  </command-request>
</scom-request>



The following figure illustrates the adapter response for the sample request: 

Sample adapter response for the uninstall-managementpack operation

<scom-response>
  <metadata>
    <status>success</status>
    <count>1</count>
  </metadata>
  <commands-output>
    <command-output>
      <metadata>
        <command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
        Startup.ps1;uninstall-managementpack -managementpack (get-managementpack
         -name Microsoft.Windows.Client.BusinessCritical) -whatif</command>
        <execution-milliseconds>4875</execution-milliseconds>
        <exit-code>0</exit-code>
        <status>success</status>
        <count>0</count>
      </metadata>
      <output>
        <line>What if: Performing operation "Uninstall-ManagementPack" on Target
         "Microsoft.Windows.Client.BusinessCritical".</line>
      </output>
    </command-output>
  </commands-output>
</scom-response>
Was this page helpful? Yes No Submitting... Thank you

Comments