Поделиться через


Protect-SCSMManagementPack

Protect-SCSMManagementPack

Protects a management pack to prevent modification.

Syntax

Parameter Set: FromManagementPack
Protect-SCSMManagementPack [-ManagementPack] <ManagementPack[]> -CompanyName <String> -KeyFilePath <String> -OutputDirectory <String> [-Copyright <String> ] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: FromManagementPackFile
Protect-SCSMManagementPack [-ManagementPackFile] <String[]> -CompanyName <String> -KeyFilePath <String> -OutputDirectory <String> [-Copyright <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed 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 .

Parameters

-CompanyName<String>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Copyright<String>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-KeyFilePath<String>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ManagementPack<ManagementPack[]>

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

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ManagementPackFile<String[]>

Specifies the name of the management pack file.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-OutputDirectory<String>

Specifies the folder for the sealed management pack.

Aliases

none

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

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.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • 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

The output type is the type of the objects that the cmdlet emits.

  • 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.

Examples

Example 1: Seal a management pack

These commands seal the management pack ContosoForm.xml.

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

Import-SCSMManagementPack

Export-SCSMManagementPack

Get-SCSMManagementPack

New-SCSMManagementPack

Test-SCSMManagementPack

New-SCSMManagementPackBundle

Remove-SCSMManagementPack