Remove-CMConfigurationPolicy

Removes a configuration policy.

Syntax

Remove-CMConfigurationPolicy
      [-Id] <Int32>
      [-Confirm]
      [-DisableWildcardHandling]
      [-Force]
      [-ForceWildcardHandling]
      [-WhatIf]
      [<CommonParameters>]
Remove-CMConfigurationPolicy [-InputObject]  [-Confirm] [-DisableWildcardHandling] [-Force]
 [-ForceWildcardHandling] [-WhatIf] []
Remove-CMConfigurationPolicy [-Name]  [-Confirm] [-DisableWildcardHandling] [-Force]
 [-ForceWildcardHandling] [-WhatIf] []

Description

The Remove-CMConfigurationPolicy cmdlet removes a configuration policy. A configuration policy can be an email profile, a firewall policy, or others. See the Alias section for additional policy types that you can use this cmdlet to remove.

Examples

Example 1: Remove a configuration policy by ID

PS C:\> Remove-CMConfigurationPolicy -ID 16777454 -Force

This command removes the configuration policy with the CI_ID of 16777454, without prompting the user for confirmation.

Example 2: Remove a configuration policy by name

PS C:\> Get-CMcertificateProfilePfx -Name "CertProf1" | Remove-CMConfigurationPolicy

This command gets the PFX certificate profile object named CertProf01 and uses the pipeline operator to pass the object to Remove-CMConfigurationPolicy which removes the certificate profile.

Required Parameters

-Id

Specifies the CI__ID of a configuration policy.

Type:Int32
Aliases:CIId, CI_ID
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies a configuration policy object. To obtain a configuration policy object, use the Get-CMConfigurationPolicy cmdlet.

Type:IResultObject
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies an array of names of configuration policies.

Type:String[]
Aliases:LocalizedDisplayName
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

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

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

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