# Set-PackageUpdateRule

LLMS index: [llms.txt](/v1.2.3.0/llms.txt)

---

<!-- This file is auto-generated using PlatyPS + HUGO Workflow automation. Avoid editing directly! Original Front-Matter:
date: 2022-09-29
document type: cmdlet
external help file: PackageUpdateInfo-Help.xml
flagTranslation: Primary
HelpUri: ""
Locale: en-US
Module Name: PackageUpdateInfo
ms.date: 09/29/2022
PlatyPS schema version: 2024-05-01
title: Set-PackageUpdateRule
type: docs
-->



## SYNOPSIS

Set a rule for checking and reporting on installed modules

## SYNTAX

### ById (Default)

```
Set-PackageUpdateRule -Id <int> [-IncludeModuleForChecking <string[]>]
 [-ExcludeModuleFromChecking <string[]>] [-ReportChangeOnMajor <bool>] [-ReportChangeOnMinor <bool>]
 [-ReportChangeOnBuild <bool>] [-ReportChangeOnRevision <bool>] [-SettingObject <Configuration>]
 [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### ByInputObject

```
Set-PackageUpdateRule -InputObject <ModuleRule[]> [-IncludeModuleForChecking <string[]>]
 [-ExcludeModuleFromChecking <string[]>] [-ReportChangeOnMajor <bool>] [-ReportChangeOnMinor <bool>]
 [-ReportChangeOnBuild <bool>] [-ReportChangeOnRevision <bool>] [-SettingObject <Configuration>]
 [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## ALIASES

This cmdlet has the following aliases,

## DESCRIPTION

This command allows to edit existing rules on how a modules is handled in reporting.

For example, you can configure PackageUpdateINfo to suppress revision updates on a frequent
updated module, so that only build, minor or major updates are reportet as "update needed".

## EXAMPLES

### EXAMPLE 1

```powershell
PS C:\> Add-PackageUpdateRule -IncludeModuleForChecking "MyModule" -ReportChangeOnMajor $true -ReportChangeOnMinor $true -ReportChangeOnBuild $true -ReportChangeOnRevision $false
```

Add a new custom rule for "MyModule" to supress notifications on revision updates of the module

## PARAMETERS

### -Confirm

If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.

```yaml
Type: SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -ExcludeModuleFromChecking

ModuleNames to exclude from update checking

```yaml
Type: String[]
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Exclude
- ExcludeModule
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -Id

The Id as an identifier for the rule

```yaml
Type: Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ById
  Position: Named
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -IncludeModuleForChecking

ModuleNames to include from update checking
By default all modules are included.

Default value is: "*"

```yaml
Type: String[]
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Include
- IncludeModule
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -InputObject

The rule object to modify

```yaml
Type: ModuleRule[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ByInputObject
  Position: Named
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -PassThru

The rule object will be parsed to the pipeline for further processing

```yaml
Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -ReportChangeOnBuild

Report when build version changed for a module

This means 'Get-PackageUpdateSetting' report update need,
when the build version version of a module change.

Major  Minor  Build  Revision
-----  -----  -----  --------
0      0      1     0

```yaml
Type: Boolean
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -ReportChangeOnMajor

Report when major version changed for a module

This means 'Get-PackageUpdateSetting' report update need,
only when the major version version of a module change.

Major  Minor  Build  Revision
-----  -----  -----  --------
1      0      0     0

```yaml
Type: Boolean
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -ReportChangeOnMinor

Report when minor version changed for a module

This means 'Get-PackageUpdateSetting' report update need,
only when the minor version version of a module change.

Major  Minor  Build  Revision
-----  -----  -----  --------
0      1      0     0

```yaml
Type: Boolean
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -ReportChangeOnRevision

Report when revision part changed for a module

This means 'Get-PackageUpdateSetting' report update need,
when the revision version version of a module change.

Major  Minor  Build  Revision
-----  -----  -----  --------
1      0      0     0

```yaml
Type: Boolean
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -SettingObject

Settings object parsed in from command Get-PackageUpdateSetting
This is an optional parameter.
By default it will use the default
settings object from the module.

```yaml
Type: Configuration
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -WhatIf

If this switch is enabled, no actions are performed but informational messages will be displayed that explain what would happen if the command were to run.

```yaml
Type: SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  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.ModuleRule[]

### PackageUpdate.Configuration

## OUTPUTS

### PackageUpdate.ModuleRule
