# Set-PackageUpdateSetting

LLMS index: [llms.txt](/v1.2.5.0/llms.txt)

---

<!-- This file is auto-generated using PlatyPS + HUGO Workflow automation. Avoid editing directly! Original Front-Matter:
date: 2023-09-29
document type: cmdlet
external help file: PackageUpdateInfo-Help.xml
flagTranslation: Primary
HelpUri: ""
Locale: en-US
Module Name: PackageUpdateInfo
ms.date: 09/29/2023
PlatyPS schema version: 2024-05-01
title: Set-PackageUpdateSetting
type: docs
-->



## SYNOPSIS

Set behaviour settings for PackageUpdateInfo module

## SYNTAX

### SetBehaviour

```
Set-PackageUpdateSetting [-ExcludeModuleFromChecking <string[]>]
 [-IncludeModuleForChecking <string[]>] [-ReportChangeOnMajor <bool>] [-ReportChangeOnMinor <bool>]
 [-ReportChangeOnBuild <bool>] [-ReportChangeOnRevision <bool>] [-UpdateCheckInterval <timespan>]
 [-LastCheck <datetime>] [-LastSuccessfulCheck <datetime>] [-InputObject <Configuration>]
 [-Path <string>] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### ResetBehaviour

```
Set-PackageUpdateSetting [-Reset] [-Path <string>] [-PassThru] [-WhatIf] [-Confirm]
 [<CommonParameters>]
```

## ALIASES

This cmdlet has the following aliases,

## DESCRIPTION

Set-PackageUpdateInfo configure basic settings for check and report on up-to-dateness information on installed modules

## EXAMPLES

### EXAMPLE 1

```powershell
PS C:\> Set-PackageUpdateSetting -ExcludeModuleFromChecking "MyLocalOnlyModule"
```

Put the module "MyLocalOnlyModule" on the exclude list for update checking.
By design, this should be considered only for modules not available in a online gallery.
This capability is designed to avoid unnecessary update checks, for modules not existing in a online gallery.

You'll not get any update information for module 'MyLocalOnlyModule' anymore!

If you have worries/issues on performance, due to a large number of modules installed, you better follow the practice to put the 'checking mechansim' in you PSProfile as a job routine every time you start a shell.
Doing so is described in the 'practical-usage' on the github project page:
https://github.com/AndiBellstedt/PackageUpdateInfo#practical-usage

### EXAMPLE 2

```powershell
PS C:\> Set-PackageUpdateSetting -ExcludeModuleFromChecking "Az.*"
```

Put all Az. modules on the exclude list for update checking.
This should be considered as a bad practice, because you'll not get any update information for all Az. modules anymore.
(and they might change quite often)

If you have worries/issues on performance, due to a large number of modules installed, you better follow the practice to put the 'checking mechansim' in you PSProfile as a job routine every time you start a shell.
Doing so is described in the 'practical-usage' on the github project page:
https://github.com/AndiBellstedt/PackageUpdateInfo#practical-usage

### EXAMPLE 3

```powershell
PS C:\> Set-PackageUpdateSetting -ExcludeModuleFromChecking @("") -IncludeModuleForChecking "*" -ReportChangeOnMajor $true -ReportChangeOnMinor $true -ReportChangeOnBuild $true -ReportChangeOnRevision $true -UpdateCheckInterval "01:00:00"
```

Reset module to it'S default behaviour

### EXAMPLE 4

```powershell
PS C:\> Set-PackageUpdateSetting -Reset
```

Reset module to it'S default behaviour

## 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 in the default rule

```yaml
Type: String[]
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Exclude
- ExcludeModule
ParameterSets:
- Name: SetBehaviour
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -IncludeModuleForChecking

ModuleNames to include from update checking in the default rule
By default all modules are included.

Default value is: "*"

```yaml
Type: String[]
DefaultValue: ''
SupportsWildcards: false
Aliases:
- Include
- IncludeModule
ParameterSets:
- Name: SetBehaviour
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -InputObject

Settings object parsed in from command Get-PackageUpdateSetting

```yaml
Type: Configuration
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: SetBehaviour
  Position: Named
  IsRequired: false
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -LastCheck

Timestamp when last check for update need on modules started

```yaml
Type: DateTime
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: SetBehaviour
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -LastSuccessfulCheck

Timestamp when last check for update need finished

```yaml
Type: DateTime
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: SetBehaviour
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -PassThru

The setting 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: ''
```

### -Path

The filepath where to setting file is stored

This is optional, default path value is:
Linux:   "$HOME/.local/share/powershell/PackageUpdateInfo/PackageUpdateSetting_$($PSEdition)_$($PSVersionTable.PSVersion.Major).json")
Windows: "$HOME\AppData\Local\Microsoft\Windows\PowerShell\PackageUpdateSetting_$($PSEdition)_$($PSVersionTable.PSVersion.Major).json")

```yaml
Type: String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- FullName
- FilePath
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 in the default rule

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: SetBehaviour
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -ReportChangeOnMajor

Report when major version changed for a module in the default rule

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: SetBehaviour
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -ReportChangeOnMinor

Report when minor version changed for a module in the default rule

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: SetBehaviour
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -ReportChangeOnRevision

Report when revision part changed for a module in the default rule

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: SetBehaviour
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -Reset

Reset module to it'S default behaviour

```yaml
Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ResetBehaviour
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -UpdateCheckInterval

The minimum interval/timespan has to gone by,for doing a new module update check

Default value is: "01:00:00"

```yaml
Type: TimeSpan
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: SetBehaviour
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  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

### PackageUpdate.Configuration

## OUTPUTS

### PackageUpdate.Configuration
