Export-SCSMManagementPack
Exports a management pack as an XML file for import into Service Manager.
Syntax
Export-SCSMManagementPack
[-ManagementPack] <ManagementPack[]>
[-PassThru]
-Path <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Export-SCSMManagementPack 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-SCSMManagementPack -Name "*snmp*"| Export-SCSMManagementPack -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.
Type: | System.Management.Automation.SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ManagementPack
Specifies one or more management packs to export. You can obtain a ManagementPack object that is returned by the Get-SCManagementPack cmdlet.
Type: | Microsoft.EnterpriseManagement.Configuration.ManagementPack[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PassThru
Specifies that output of this cmdlet can be passed to other cmdlets.
Type: | System.Management.Automation.SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Path
Specifies the folder into which exported management pack files will be stored. The specified folder must exist before you run the cmdlet.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | System.Management.Automation.SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Microsoft.EnterpiseManagement.Configuration.ManagementPack
You can pipe a management pack to the ManagementPack parameter of the Export-SCSMManagementPack cmdlet, for example, the object that is returned by the Get-SCSMManagementPack cmdlet.
Outputs
Microsoft.EnterpiseManagement.Configuration.ManagementPack
When you use the PassThru parameter, the Export-SCSMManagementPack cmdlet returns a ManagementPack object.