Edit

Share via


Get-CMSoftwareUpdateAutoDeploymentRule

Get an automatic deployment rule for software updates.

Syntax

SearchByName (Default)

Get-CMSoftwareUpdateAutoDeploymentRule
    [[-Name] <String>]
    [-Fast]
    [-IsServicingPlan <Boolean>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [<CommonParameters>]

SearchByIdMandatory

Get-CMSoftwareUpdateAutoDeploymentRule
    [-Id] <Int32[]>
    [-Fast]
    [-IsServicingPlan <Boolean>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [<CommonParameters>]

Description

The Get-CMSoftwareUpdateAutoDeploymentRule cmdlet gets the specified automatic deployment rules for 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 by ID or by name. You can use this cmdlet to get deployment rules for automatic software updates to use with other cmdlets. For example, the Invoke-CMSoftwareUpdateAutoDeploymentRule or Remove-CMSoftwareUpdateAutoDeploymentRule cmdlets.

Note

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

Examples

Example 1: Get an ADR by name

This command gets an automatic deployment rule named Weekly Driver Updates.

Get-CMSoftwareUpdateAutoDeploymentRule -Name "Weekly Driver Updates"

Example 2: Get an ADR by ID

This command gets an automatic deployment rule that has the ID 33.

Get-CMSoftwareUpdateAutoDeploymentRule -Id "33"

Parameters

-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

-Fast

Add this parameter to not automatically refresh lazy properties. Lazy properties contain values that are relatively inefficient to retrieve. Getting these properties can cause additional network traffic and decrease cmdlet performance.

If you don't use this parameter, the cmdlet displays a warning. To disable this warning, set $CMPSSuppressFastNotUsedCheck = $true.

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

Specify an array of automatic deployment rule IDs to configure. This value is the AutoDeploymentID property of the ADR 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

-IsServicingPlan

The Get-CMSoftwareUpdateAutoDeploymentRule cmdlet gets the specified automatic deployment rules for 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 by ID or by name. You can use this cmdlet to get deployment rules for automatic software updates to use with other cmdlets. For example, the Invoke-CMSoftwareUpdateAutoDeploymentRule or Remove-CMSoftwareUpdateAutoDeploymentRule cmdlets.

Note

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

Parameter properties

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

-Name

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

Parameter properties

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

Parameter sets

SearchByName
Position:0
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

None

Outputs

IResultObject

IResultObject

Notes

The SMS_AutoDeployment output object displays many of the ADR settings as the stored XML. Parse this XML for specific settings.

For example:

  • The -Language parameter is stored in the UpdateRuleXML property as <MatchRules><string>'Locale:10'</string></MatchRules>
  • The -LanguageSelection parameter is stored in the ContentTemplate property as <ContentLocales><Locale>Locale:10</Locale></ContentLocales>

These locale codes are stored as the decimal equivalent of the Windows language ID. For example, 9 is 0x0009 for English, and 10 is 0x000A for Spanish. For more information, see [MS-LCID]: Windows Language Code Identifier (LCID) Reference.