Version 1.0.2.0 of the documentation is no longer actively maintained. The site that you are currently viewing is an archived snapshot.
Get-PackageUpdateInfo
For AI agents: a documentation index is available at /llms.txt; a markdown version of this page is available at /v1.0.2.0/docs/commands/get-packageupdateinfo/index.md.
SYNOPSIS
Get info about up-to-dateness for installed modules
SYNTAX
DefaultSet1 (Default)
Get-PackageUpdateInfo [-Name <string[]>] [-Repository <string[]>] [-ShowOnlyNeededUpdate]
[<CommonParameters>]
CurrentUser
Get-PackageUpdateInfo [-Name <string[]>] [-Repository <string[]>] [-ShowOnlyNeededUpdate]
[-CurrentUser] [<CommonParameters>]
AllUsers
Get-PackageUpdateInfo [-Name <string[]>] [-Repository <string[]>] [-ShowOnlyNeededUpdate]
[-AllUsers] [<CommonParameters>]
ALIASES
This cmdlet has the following aliases,
DESCRIPTION
Get-PackageUpdateInfo query locally installed modules and compare them against the online versions for up-to-dateness
EXAMPLES
EXAMPLE 1
PS C:\> Get-PackageUpdateInfo
Outputs update information for all modules (currentUser and AllUsers). Output can look like:
Name Repository VersionInstalled VersionOnline NeedUpdate Path
PSReadline PSGallery 1.2 1.2 False C:\Program Files\WindowsPowerShell\Modules\PSReadline Pester PSGallery 4.4.0 4.4.2 True C:\Program Files\WindowsPowerShell\Modules\Pester
EXAMPLE 2
PS C:\> Get-PackageUpdateInfo -ShowOnlyNeededUpdate
This will filter output to show only modules where NeedUpdate is True Output can look like:
Name Repository VersionInstalled VersionOnline NeedUpdate Path
Pester PSGallery 4.4.0 4.4.2 True C:\Program Files\WindowsPowerShell\Modules\Pester
EXAMPLE 3
PS C:\> "Pester", "PSReadline" | Get-PackageUpdateInfo
Pipeline is supported. This returns the infos only for the two modules “Pester”, “PSReadline”
This also can be done with Get-Module cmdlet: Get-Module “Pester”, “PSReadline” | Get-PackageUpdateInfo
PARAMETERS
-AllUsers
Only look for modules in the AllUsers/system directories. Keep in mind, that admin rights are required to update those modules.
Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: AllUsers
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-CurrentUser
Only look for modules in the current user profile. This is helpful if you’re running without admin right, which you should always do as your default work preference.
Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: CurrentUser
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Name
The name of the module to check
Type: String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: true
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Repository
The repository to check
Type: String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-ShowOnlyNeededUpdate
This switch suppresses up-to-date modules from the output. Only output modules needed to update.
Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
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.