Share via


Import-SCManagementPack

Imports management packs.

Syntax

FromManagementPackFile (Default)

Import-SCManagementPack
    [-Fullname] <String[]>
    [-PassThru]
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

FromManagementPack

Import-SCManagementPack
    [-ManagementPack] <ManagementPack[]>
    [-PassThru]
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Import-SCManagementPack cmdlet imports management packs.

Service Manager attempts to validate the XML code of the management packs before the import. If the management pack contains XML code that is not valid, the management pack is not imported and an error is returned.

Examples

Example 1: Import a management pack file

PS C:\>Import-SCManagementPack "c:\temp\contosomanagementpack.xml"

This command imports the management pack file c:\temp\contosomanagementpack.xml.

Parameters

-ComputerName

Specifies a computer with which to establish a connection. The computer must be running the System Center Data Access service. The default value is the computer for the current management group connection.

Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name (FQDN). To specify the local computer, type the computer name, "localhost", or a dot (.).

Parameter properties

Type:

System.String[]

Default value:Localhost
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Credential

Specifies a user account under which the management group connection will run. The account must have access to the server that is specified in the ComputerName parameter, if the server is specified. The default value is the current user.

You can enter a PSCredential object that is returned by the Get-Credential cmdlet.

Parameter properties

Type:System.Management.Automation.PSCredential
Default value:User account of the current context.
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Fullname

Specifies the full path and file names of the management packs to import. The list must contain files that are management packs (*.xml, .mp) or management pack bundles (.mpb). If you specify a management pack bundle, all management packs from that bundle are imported.

Parameter properties

Type:

System.String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Path

Parameter sets

FromManagementPackFile
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ManagementPack

Specifies one or more management packs to import. You can enter a ManagementPack object that is returned by the Get-SCManagementPack cmdlet.

Parameter properties

Type:

Microsoft.EnterpriseManagement.Configuration.ManagementPack[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromManagementPack
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

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

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SCSession

Specifies a connection to a management server. The default value is the current management group connection.

You can enter a management group connection object that is returned by the Get-SCManagementGroupConnection cmdlet.

Parameter properties

Type:

Microsoft.SystemCenter.Core.Connection.Connection[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.EnterpriseManagement.Configuration.ManagementPack

You can pipe a management pack to the ManagementPack parameter of the Import-SCManagementPack cmdlet.

Outputs

Microsoft.EnterpriseManagement.Configuration.ManagementPack

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

Notes

  • If you specify multiple management packs, 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.