install-managementpack operation

The install-managementpack operation installs the specified management pack on the Microsoft System Center Operations Manager 2007 management server.

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

Adapter request elements for the install-managementpack operation

Element

Definition

Required

<operation-name>

Specifies the operation name: install-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

<sourcefile-path>

Specifies the path of the file that contains the management pack

This file must have a .xml or .mp extension, and you must include the file extension in the value of this parameter.

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

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

Sample adapter request for the install-managementpack operation

<scom-request>
  <operation-name>install-managementpack</operation-name>
  <command-request>
    <timeout-secs>120</timeout-secs>
    <command-parameters>
      <sourcefile-path>C:\packs\Microsoft.Windows.Client.BusinessCritical.xml
       </sourcefile-path>
      <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 install-managementpack operation

<scom-response>
  <metadata>
    <status>success</status>
    <count>1</count>
  </metadata>
  <commands-output>
    <command-output>
      <metadata>
        <command>./Microsoft.EnterpriseManagement.OperationsManager.ClientShell.
        Startup.ps1;install-managementpack -filepath
         C:\packs\Microsoft.Windows.Client.BusinessCritical.xml -whatif</command>
        <execution-milliseconds>4969</execution-milliseconds>
        <exit-code>0</exit-code>
        <status>success</status>
        <count>0</count>
      </metadata>
      <output>
        <line>What if: Performing operation
         "Microsoft.Windows.Client.BusinessCritical" on Target "M1".</line>
      </output>
    </command-output>
  </commands-output>
</scom-response>
Was this page helpful? Yes No Submitting... Thank you

Comments