# Get-PackageUpdateRule

LLMS index: [llms.txt](/llms.txt)

---

<!-- This file is auto-generated using PlatyPS + HUGO Workflow automation. Avoid editing directly! Original Front-Matter:
date: 2026-06-22
document type: cmdlet
external help file: PackageUpdateInfo-Help.xml
flagTranslation: Primary
HelpUri: https://packageupdateinfo.andibellstedt.com/docs/commands/get-packageupdaterule/
Locale: en-US
Module Name: PackageUpdateInfo
ms.date: 06/22/2026
PlatyPS schema version: 2024-05-01
title: Get-PackageUpdateRule
type: docs
-->



## 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

```powershell
PS C:\> Get-PackageUpdateRule
```

Retrieve all custom rules currently configured for package update handling.

### EXAMPLE 2

```powershell
PS C:\> Get-PackageUpdateRule -Id 1, 2
```

Retrieve the custom rules that have the specified identifiers.

### EXAMPLE 3

```powershell
PS C:\> Get-PackageUpdateRule -ExcludeModuleFromChecking 'Pester'
```

Retrieve the custom rules that exclude Pester from update checking.

### EXAMPLE 4

```powershell
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.

```yaml
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.

```yaml
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.

```yaml
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: "*"

```yaml
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.

```yaml
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](https://go.microsoft.com/fwlink/?LinkID=113216).

## 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

## RELATED LINKS

- [packageupdateinfo.andibellstedt.com/docs/commands/get-packageupdaterule](https://packageupdateinfo.andibellstedt.com/docs/commands/get-packageupdaterule/)
