Get-PackageUpdateRule
For AI agents: a documentation index is available at /llms.txt; a markdown version of this page is available at /docs/commands/get-packageupdaterule/index.md.
SYNOPSIS
Retrieve one or more package update rules used to control module update checks and reporting.
SYNTAX
ShowAll (Default)
Get-PackageUpdateRule [-IncludeModuleForChecking <string>] [-ExcludeModuleFromChecking <string>]
[-IncludeDefaultRule] [-SettingObject <Configuration>] [<CommonParameters>]
ById
Get-PackageUpdateRule -Id <int[]> [-SettingObject <Configuration>] [<CommonParameters>]
ALIASES
This cmdlet has the following aliases,
DESCRIPTION
Retrieves the custom rules that define how modules are handled during update checks and reporting. You can filter rules by identifier, by module inclusion or exclusion patterns, or include the default rule from the active settings object to compare custom behavior with the built-in fallback behavior.
EXAMPLES
EXAMPLE 1
PS C:\> Get-PackageUpdateRule
Retrieve all custom rules currently configured for package update handling.
EXAMPLE 2
PS C:\> Get-PackageUpdateRule -Id 1, 2
Retrieve the custom rules that have the specified identifiers.
EXAMPLE 3
PS C:\> Get-PackageUpdateRule -ExcludeModuleFromChecking 'Pester'
Retrieve the custom rules that exclude Pester from update checking.
EXAMPLE 4
PS C:\> Get-PackageUpdateRule -IncludeModuleForChecking 'PackageManagement' -IncludeDefaultRule
Retrieve the custom rules that include PackageManagement for update checking and also return the default rule.
PARAMETERS
-ExcludeModuleFromChecking
Filters the returned rules to those that exclude the specified module name from update checking.
Type: String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Exclude
- ExcludeModule
ParameterSets:
- Name: ShowAll
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Id
Specifies one or more rule identifiers to retrieve.
Type: Int32[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ById
Position: Named
IsRequired: true
ValueFromPipeline: true
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-IncludeDefaultRule
Adds the default rule from the supplied or active settings object to the output in addition to any custom rules.
Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ShowAll
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-IncludeModuleForChecking
Filters the returned rules to those that include the specified module name for update checking. By default, all modules are included when no filter is supplied.
Default value is: “*”
Type: String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Include
- IncludeModule
ParameterSets:
- Name: ShowAll
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-SettingObject
Specifies a settings object returned by Get-PackageUpdateSetting. If this parameter is omitted, the command uses the current module settings object.
Type: Configuration
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: true
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
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
System.Int32[]
PackageUpdate.Configuration
OUTPUTS
PackageUpdate.ModuleRule
NOTES
Version : 1.1.0.0 Author : Andi Bellstedt Date : 2026-06-21 Keywords : PackageUpdateInfo, Update, Module, Rule