Remove-CMSoftwareUpdateAutoDeploymentRule

Removes Configuration Manager deployment rules for automatic software updates.

Syntax

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

Description

The Remove-CMSoftwareUpdateAutoDeploymentRule cmdlet removes specified Microsoft System Center Configuration Manager deployment rules for automatic software updates.

System Center Configuration Manager uses rules to manage automatic deployment of software updates. When a rule runs, System Center Configuration Manager adds updates that qualify for the rule to a software update group. The System Center Configuration Manager server downloads content files and copies them to distribution points, and then updates client computers.

You can specify rules to remove by ID or by name, or specify a rule object by using the Get-CMSoftwareUpdateAutoDeploymentRule cmdlet. This cmdlet deletes rules permanently. You can use the Disable-CMSoftwareUpdateAutoDeploymentRule cmdlet to suspend a rule.

Examples

Example 1: Remove a deployment rule by name

PS C:\> Remove-CMSoftwareUpdateAutoDeploymentRule -Name "Weekly Driver Updates"
Remove
Are you sure you wish to remove SoftwareUpdateAutoDeploymentRule: Name="Weekly Driver Updates"?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

This command removes a rule named Weekly Driver Updates. Because the command does not include the Force parameter, the cmdlet prompts you before it deletes the rule.

Example 2: Remove a deployment rule by ID

PS C:\> Remove-CMSoftwareUpdateAutoDeploymentRule -Id "16777217" -Force

This command disables a deployment rule that has the ID 16777217. This command includes the Force parameter, so the cmdlet does not prompt you before it removes the rule.

Example 3: Remove a deployment rule by using a variable

PS C:\> $CMSUADR = Get-CMSoftwareUpdateAutoDeploymentRule -Name "Weekly Driver Updates"
PS C:\> Remove-CMSoftwareUpdateAutoDeploymentRule -InputObject $CMSUADR -Force

The first command gets a deployment rule that has the specified name, and then stores it in the $CMSUADR variable.

The second command removes the rule stored in the variable.

Required Parameters

-Id

Specifies an array of IDs for rules for automatic deployment of software updates. This value is the AutoDeploymentID property of the deployment rule object.

Type:Int32
Aliases:AutoDeploymentId
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies a software update automatic deployment rule object. To obtain a deployment rule object, use Get-CMSoftwareUpdateAutoDeploymentRule.

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

Specifies a name of a rule for automatic deployment of software updates.

Type:String
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
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type:SwitchParameter
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
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type:SwitchParameter
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
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False