Edit

Share via


Remove-CMSoftwareUpdateAutoDeploymentRule

Removes Configuration Manager deployment rules for automatic software updates.

Syntax

SearchByIdMandatory (Default)

Remove-CMSoftwareUpdateAutoDeploymentRule
    [-Id] <Int32>
    [-Force]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SearchByValueMandatory

Remove-CMSoftwareUpdateAutoDeploymentRule
    [-InputObject] <IResultObject>
    [-Force]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SearchByNameMandatory

Remove-CMSoftwareUpdateAutoDeploymentRule
    [-Name] <String>
    [-Force]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

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

Configuration Manager uses rules to manage automatic deployment of software updates. When a rule runs, Configuration Manager adds updates that qualify for the rule to a software update group. The 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.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Remove a deployment rule by name

PS XYZ:\> 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 XYZ:\> 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 XYZ:\> $CMSUADR = Get-CMSoftwareUpdateAutoDeploymentRule -Name "Weekly Driver Updates"
PS XYZ:\> 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.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type: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

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

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

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AutoDeploymentId

Parameter sets

SearchByIdMandatory
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

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

Parameter properties

Type:IResultObject
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SearchByValueMandatory
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SearchByNameMandatory
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Parameter properties

Type: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.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object