Share via


Remove-SCManagementPack

Removes management packs.

Syntax

Default (Default)

Remove-SCManagementPack
    [-ManagementPack] <ManagementPack[]>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-SCManagementPack 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.

Examples

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

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

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.

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

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

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

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ManagementPack

Specifies the management pack to remove. You can specify a ManagementPack object that is returned by the Get-SCManagementPack cmdlet.

Parameter properties

Type:

Microsoft.EnterpriseManagement.Configuration.ManagementPack[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.EnterpriseManagement.Configuration.ManagementPack

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

Outputs

None.

This cmdlet does not generate any output.