Skip to content

Latest commit

 

History

History
228 lines (171 loc) · 6.44 KB

Remove-CMSoftwareUpdateAutoDeploymentRule.md

File metadata and controls

228 lines (171 loc) · 6.44 KB
description external help file Module Name ms.date schema title
Removes Configuration Manager deployment rules for automatic software updates.
AdminUI.PS.dll-Help.xml
ConfigurationManager
05/07/2019
2.0.0
Remove-CMSoftwareUpdateAutoDeploymentRule

Remove-CMSoftwareUpdateAutoDeploymentRule

SYNOPSIS

Removes Configuration Manager deployment rules for automatic software updates.

SYNTAX

SearchByIdMandatory (Default)

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

SearchByValueMandatory

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

SearchByNameMandatory

Remove-CMSoftwareUpdateAutoDeploymentRule [-Force] [-Name] <String> [-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

-DisableWildcardHandling

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

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ForceWildcardHandling

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

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

Type: Int32
Parameter Sets: SearchByIdMandatory
Aliases: AutoDeploymentId

Required: True
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
Parameter Sets: SearchByValueMandatory
Aliases:

Required: True
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
Parameter Sets: SearchByNameMandatory
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

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

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

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

INPUTS

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

OUTPUTS

System.Object

NOTES

RELATED LINKS

Disable-CMSoftwareUpdateAutoDeploymentRule

Enable-CMSoftwareUpdateAutoDeploymentRule

Get-CMSoftwareUpdateAutoDeploymentRule

Invoke-CMSoftwareUpdateAutoDeploymentRule