Protect-SCSMManagementPack

Protects a management pack to prevent modification.

Syntax

Protect-SCSMManagementPack [-ManagementPack] <ManagementPack[]> -CompanyName <String> [-Copyright <String>]
 -KeyFilePath <String> -OutputDirectory <String> [-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]
Protect-SCSMManagementPack [-ManagementPackFile] <String[]> -CompanyName <String> [-Copyright <String>]
 -KeyFilePath <String> -OutputDirectory <String> [-Confirm] [-WhatIf] [<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:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Copyright

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

Type:String
Required:False
Position:Named
Default value:None
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:String
Required:True
Position:Named
Default value:None
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:ManagementPack[]
Required:True
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-ManagementPackFile

Specifies the name of the management pack file.

Type:String[]
Required:True
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-OutputDirectory

Specifies the folder for the sealed management pack.

Type:String
Required:True
Position:Named
Default value:None
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:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

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

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

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value: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.

Inputs

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.

Outputs

Sealed management pack.

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