< Back

Find-Package

Sat Jan 18, 2020 6:23 pm

NAME Find-Package



SYNOPSIS

Finds software packages in available package sources.





SYNTAX

Find-Package [[-Name] <String[]>] [-AllVersions] [-AllowPrereleaseVersions] [-ConfigFile <String>] [-Contains

<String>] [-Credential <PSCredential>] [-FilterOnTag <String[]>] [-Force] [-ForceBootstrap] [-Headers <String[]>]

[-IncludeDependencies] [-MaximumVersion <String>] [-MinimumVersion <String>] [-ProviderName {msi | NuGet | msu |

Programs | PowerShellGet | psl | chocolatey}] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-RequiredVersion

<String>] [-SkipValidate] [-Source <String[]>] [<CommonParameters>]



Find-Package [[-Name] <String[]>] [-AllVersions] [-Command <String[]>] [-Credential <PSCredential>] [-DscResource

<String[]>] [-Filter <String>] [-Force] [-ForceBootstrap] [-IncludeDependencies] [-Includes {DscResource | Cmdlet

| Function | Workflow | RoleCapability}] [-MaximumVersion <String>] [-MinimumVersion <String>]

[-PackageManagementProvider <String>] [-ProviderName {msi | NuGet | msu | Programs | PowerShellGet | psl |

chocolatey}] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-PublishLocation <String>] [-RequiredVersion

<String>] [-RoleCapability <String[]>] [-ScriptPublishLocation <String>] [-ScriptSourceLocation <String>] [-Source

<String[]>] [-Tag <String[]>] [-Type {Module | Script | All}] [<CommonParameters>]





DESCRIPTION

The Find-Package cmdlet finds matching software packages that are available in package sources.





PARAMETERS

-AllVersions [<SwitchParameter>]

Indicates that Find-Package returns all available versions of the package. By default, Find-Package only

returns the newest available version.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-AllowPrereleaseVersions [<SwitchParameter>]

{{Fill AllowPrereleaseVersions Description}}



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Command <String[]>

Specifies an array of commands for which this cmdlet searches.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ConfigFile <String>

{{Fill ConfigFile Description}}



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Contains <String>

{{Fill Contains Description}}



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Credential <PSCredential>

Specifies a user account that has permission to search for packages.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DscResource <String[]>

Specifies an array of Desired State Configuration (DSC) resources for which this cmdlet searches.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Filter <String>

Specifies terms to search for within the Name and Description properties.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-FilterOnTag <String[]>

{{Fill FilterOnTag Description}}



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Forces the command to run without asking for user confirmation.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ForceBootstrap [<SwitchParameter>]

Indicates that this cmdlet forces Package Management to automatically install the package provider.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Headers <String[]>

{{Fill Headers Description}}



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-IncludeDependencies [<SwitchParameter>]

Indicates that this cmdlet includes package dependencies in the results.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Includes <String[]>

Specifies whether Find-Package should find all packages with DSC resources, cmdlets, functions, or workflows.

The acceptable values for this parameter are:



- Cmdlet



- DscResource



- Function



- Workflow



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MaximumVersion <String>

Specifies the maximum allowed version of the package that you want to find. If you do not add this parameter,

Find-Package finds the highest available version of the package.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MinimumVersion <String>

Specifies the minimum allowed version of the package that you want to find. If you do not add this parameter,

Find-Package finds the highest available version of the package that also satisfies any maximum specified

version specified by the MaximumVersion parameter.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String[]>

Specifies one or more package names, or package names with wildcard characters. Separate multiple package

names with commas.



Required? false

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PackageManagementProvider <String>

Specifies the name of the Package Management provider.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ProviderName <String[]>

Specifies one or more package provider names. Separate multiple package provider names with commas.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Proxy <Uri>

@{Text=}



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ProxyCredential <PSCredential>

@{Text=}



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PublishLocation <String>

Specifies a location for publishing the package.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RequiredVersion <String>

Specifies the exact allowed version of the package to find. If you do not add this parameter, Find-Package

finds the highest available version of the provider that also satisfies any maximum version specified by the

MaximumVersion parameter.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RoleCapability <String[]>

@{Text=}



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ScriptPublishLocation <String>

Specifies a script publishing location for the package.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ScriptSourceLocation <String>

Specifies a script source location.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-SkipValidate [<SwitchParameter>]

{{Fill SkipValidate Description}}



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Source <String[]>

Specifies one or more package sources. You can get a list of available package sources by using the

Get-PackageSource cmdlet.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Tag <String[]>

Specifies one or more strings to search for in the package metadata.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Type <String>

Specifies whether to search for packages with a module, a script, or either.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



You cannot pipe input to this cmdlet





OUTPUTS

SoftwareIdentify[]

This cmdlet does not produce any output.





NOTES









Example 1: Find all available packages from a package provider



PS C:\\>Find-Package -Provider "PSModule"



This command finds all available Windows PowerShell module packages from galleries that are registered with the

PSModule provider.

Example 2: Find a package from a provider that is not yet installed



PS C:\\>Find-Package -Name "Git" -Provider "Chocolatey"



This command first automatically installs the Chocolatey provider on the local computer, then searches for the Git

package within that provider.

Example 3: Find a package from a package source



PS C:\\>Find-Package -Name "Git" -Source "ChocolateyRepository"



This command finds a package from a specified package source. This is a useful command if you know the name of the

package source that you want to search, but are unsure about the package provider to which the source is

registered. Without specifying a package source, Find-Package searches through all installed package providers and

their package sources for a specified package. You can run Get-PackageSource -Location to get a package source

name.

Example 4: Find a package from a file system



PS C:\\>Find-Package "C:\\temp"



This command finds packages from all installed PackageManagement package providers that are stored in the C:\\temp

folder on the local computer.

Example 5: Find a package with a specific name and version



PS C:\\>Find-Package -Name "DSCAccel" -RequiredVersion "2.1.2"



This command finds version 2.1.2 of a package named DSCAccelerator. Although only part of the package name has

been specified, Find-Package should be able to find the DSCAccelerator package if there are no other packages with

a name matching that pattern.

Example 6: Find packages within a range of versions



PS C:\\>Find-Package -Name "DSCAccelerator" -MinimumVersion "1.5.0" -MaximumVersion "2.1" -AllVersions



This command finds a matching range of versions of a package named DSCAccelerator, by adding the MinimumVersion

and MaximumVersion parameters to specify a range, and the AllVersions parameter to specify that all matching

results within that range are returned as results.



RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=517132

about_PackageManagement

Get-Package

Install-Package

Save-Package

Uninstall-Package