Share via


Export-SCManagementPack

Exports a management pack as an XML file for import into Service Manager.

Syntax

Default (Default)

Export-SCManagementPack
    [-ManagementPack] <ManagementPack[]>
    [-PassThru]
    -Path <String>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Export-SCManagementPack cmdlet exports a management pack as an unsealed, valid XML formatted file that you can later import into smshort. All of the management pack’s information is included in the file as XML data. You can use this cmdlet to save or archive management pack information.

Examples

Example 1: Export management packs matching a name

PS C:\>Get-SCManagementPack -Name "*snmp*"| Export-SCManagementPack -Path "C:\temp"; ls "C:\temp\*snmp*"

Directory: C:\temp

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----        7/19/2023   4:58 PM         540806 System.Snmp.Library.xml

This command exports all management packs with a name that is similar to snmp.

Parameters

-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

-ManagementPack

Specifies one or more management packs to export. You can obtain 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

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

-PassThru

Specifies that output of this cmdlet can be passed to other cmdlets.

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

-Path

Specifies the folder into which exported management pack files will be stored. The specified folder must exist before you run the cmdlet.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
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.EnterpiseManagement.Configuration.ManagementPack

You can pipe a management pack to the ManagementPack parameter of the Export-SCManagementPack cmdlet, for example, the object that is returned by the Get-SCManagementPack cmdlet.

Outputs

Microsoft.EnterpiseManagement.Configuration.ManagementPack

When you use the PassThru parameter, the Export-SCManagementPack cmdlet returns a ManagementPack object.