Protect-SCSMManagementPack

Seals a management pack, preventing it from being modified.

Syntax

Protect-SCSMManagementPack
       [-ManagementPack] <ManagementPack[]>
       -OutputDirectory <String>
       -KeyFilePath <String>
       -CompanyName <String>
       [-Copyright <String>]
       [-PassThru]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
Protect-SCSMManagementPack
       [-ManagementPackFile] <String[]>
       -OutputDirectory <String>
       -KeyFilePath <String>
       -CompanyName <String>
       [-Copyright <String>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

The Protect-SCSMManagementPack cmdlet seals a management pack to prevent modification. The sealed management pack is stored in the folder that is specified by the OutputDirectory parameter. The sealed management pack can be imported into smshort.

Examples

Example 1: Seal a management pack

PS C:\>$Mp = Get-SCSMManagementPack -ManagementPackFile "Resources\ContosoForm.xml"
PS C:\> $Arguments = @{
>> ManagementPack = $Mp
>> OutputDirectory = $PWD
>> KeyFilePath = "Resources\keyfile.snk"
>> CompanyName = "Contoso"
>> Copyright = "2011"}
PS C:\> Protect-SCSMManagementPack @Arguments

These commands seal the management pack ContosoForm.xml.

Parameters

-CompanyName

Specifies the company name for the signature of the sealed management pack.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Specifies the copyright string for the signature of the sealed management pack.

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-KeyFilePath

Specifies the path to the file that contains the key for the signature of the sealed management pack.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ManagementPack

Specifies the management pack to seal. You can enter a ManagementPack object that is returned by the Get-SCSMManagementPack cmdlet.

Type:Microsoft.EnterpriseManagement.Configuration.ManagementPack[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ManagementPackFile

Specifies the name of the management pack file.

Type:System.String[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-OutputDirectory

Specifies the folder for the sealed management pack.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Specifies the output object that represents the sealed management pack. This output object 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

-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

System.String

You can pipe a management pack file name to the ManagementPackFIle parameter of the Protect-SCSMManagementPack cmdlet.

Microsoft.EnterpriseManagement.Configuration.ManagementPackManagement pack object.

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

Outputs

Management pack object.

This cmdlet generates a management pack object when it is used with the PassThru parameter.

Sealed management pack.

This cmdlet generates a sealed management pack that is stored in the folder that is specified by the OutputDirectory parameter.