Remove-SCSMManagementPack

Removes management packs.

Syntax

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

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.

Examples

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

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

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-SCSMManagementPack | Where{ $_.Name -Match "Contoso" }; Remove-SCSMManagementPack $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.

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

-ManagementPack

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

-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

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

None.

This cmdlet does not generate any output.