Edit

Share via


Enable-CMSoftwareUpdateAutoDeploymentRule

Enables Configuration Manager deployment rules for automatic software updates.

Syntax

SearchByIdMandatory (Default)

Enable-CMSoftwareUpdateAutoDeploymentRule
    -Id <String[]>
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SearchByValueMandatory

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

SearchByNameMandatory

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

Description

The Enable-CMSoftwareUpdateAutoDeploymentRule cmdlet enables specified Configuration Manager deployment rules for automatic software updates. While a rule is disabled, it does not run in accordance with its schedule and you cannot run it manually.

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 enable by ID or by name, or specify a rule object by using the Get-CMSoftwareUpdateAutoDeploymentRule cmdlet. You can use the Disable-CMSoftwareUpdateAutoDeploymentRule cmdlet to disable a rule. To remove a rule permanently, use the Remove-CMSoftwareUpdateAutoDeploymentRule cmdlet.

Note

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

Examples

Example 1: Enable a deployment rule by name

PS XYZ:\>Enable-CMSoftwareUpdateAutoDeploymentRule -Name "Weekly Driver Updates"

This command enables a rule named Weekly Driver Updates.

Example 2: Enable a deployment rule by ID

PS XYZ:\>Enable-CMSoftwareUpdateAutoDeploymentRule -Id "16777217"

This command enables a deployment rule that has the ID 16777217.

Example 3: Enable a deployment rule by using a variable

PS XYZ:\> $CMSUADR = Get-CMSoftwareUpdateAutoDeploymentRule -Name "Weekly Driver Updates"
PS XYZ:\> Enable-CMSoftwareUpdateAutoDeploymentRule -InputObject $CMSUADR

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

The second command enables 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

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

String[]

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

Parameter sets

SearchByIdMandatory
Position:Named
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:Named
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:Named
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