次の方法で共有


Remove-SCSMManagementPack

Remove-SCSMManagementPack

Removes management packs.

Syntax

Parameter Set: FromManagementPack
Remove-SCSMManagementPack [-ManagementPack] <ManagementPack[]> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Remove-SCSMManagementPack cmdlet removes management packs, along with all instances of types that are included in those management packs. You cannot remove a management pack when it is depended on by other management packs.

Parameters

-ManagementPack<ManagementPack[]>

Specifies the management pack to remove. You can specify 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

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

  • Microsoft.EnterpriseManagement.Configuration.ManagementPack

    You can pipe a management pack to the ManagementPack parameter of the Remove-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.

  • None.

    This cmdlet does not generate any output.

Examples

Example 1: Remove management packs by name by using the pipeline operator

This command removes all management packs in which the name matches the string "Contoso." The name is passed to the command by using the pipeline operator.

PS C:\>Get-SCSMManagementPack | Where{ $_.Name -Match "Contoso" } | Remove-SCSMManagementPack

Example 2 : Remove management packs by name without using the pipeline operator

This command removes all management packs in which the name matches the string "Contoso."

PS C:\>$Mps = Get-SCSMManagementPack | Where{ $_.Name -Match "Contoso" }; Remove-SCSMManagementPack $Mps

Import-SCSMManagementPack

Export-SCSMManagementPack

Get-SCSMManagementPack

New-SCSMManagementPack

Protect-SCSMManagementPack

Test-SCSMManagementPack

New-SCSMManagementPackBundle