Partager via


Import-SCSMManagementPack

Import-SCSMManagementPack

Specifies the credentials to use when you connect to the server on which the Service Manager SDK Service is running. The provided user account must have access to that server. The default value for this parameter is the user account of the current context.

Syntax

Parameter Set: Default
Import-SCSMManagementPack [-Fullname] <String[]> [-ComputerName <String> ] [-Credential <PSCredential> ] [-PassThru] [ <CommonParameters>]

Detailed Description

The classes managed by Service Manager must be defined in a management pack. Management packs consist of an XML manifest that defines metadata about objects and references to resources that the objects use. An unsealed management pack is an .xml file that can be modified, and a sealed management pack is an .mp file that cannot be modified. Sample management packs can be found in [Service Manager installation folder]\Microsoft System Center\Service Manager 2010\.
The Service Manager server into which the management pack is being imported will try to validate the management pack before importing it. If the management pack contains XML code that is not valid, the management pack will not be imported, and an error will be returned.

Parameters

-ComputerName<String>

Specifies the name of the computer on which the Service Manager SDK Service is running. The default value is "localhost". The user account that is defined in the Credential parameter must have access rights to the specified computer.

Aliases

none

Required?

false

Position?

named

Default Value

localhost

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies the credentials to use when you connect to the server specified in the ComputerName parameter. The specified user account must have access to that server. The default value for this parameter is the user account of the current context.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Fullname<String[]>

Specifies the full paths and file names of the files to import. The supplied files must be management packs (*.xml, *.mp) or management pack bundles (*.mpb). If you specify a management pack bundle file, all management packs from that bundle file will be imported.
The Fullname parameter is mandatory.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-PassThru

Passes the newly imported management pack to the pipeline. By default, this cmdlet does not generate any output.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.EnterpriseManagement.Configuration.ManagementPack

    An object that represents the management pack, available only when you use the -PassThru parameter.

Notes

  • If multiple management packs are provided, the order in which those management packs are imported will satisfy management pack interdependencies. As a result, management packs might be imported in an order that differs from the order that is provided at the command prompt.

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

This command imports the c:\temp\Mymanagementpack.xml management pack file into the Service Manager environment.

C:\PS>Import-SCSMManagementPack -Fullname c:\temp\mymanagementpack.xml

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

This command imports the c:\temp\mymanagementpackbundle.mpb management pack bundle file into the Service Manager environment.

C:\PS>Import-SCSMManagementPack -Fullname c:\temp\mymanagementpackbundle.mpb

-------------------------- EXAMPLE 3 --------------------------

Description

-----------

This example shows how to import the management packs from the management pack bundle file at c:\temp\mymanagementpackbundle.mpb and emit the imported management packs.

C:\PS>Import-SCSMManagementPack c:\temp\mymanagementpackbundle.mpb -passthruIsSealed    Name--------    -----False       Woodgrove.ManagementPack

Getting Started with Service Manager Cmdlets for Windows PowerShell

Export-SCSMManagementPack
Get-SCSMManagementPack