Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Find-Module

Find-Module

psget-2.psm1, psget.psm1

Synopsis

Finds modules from an online gallery that match specified criteria.

Syntax

Find-Module [-Name] [-MinimumVersion] [-Repository] [-RequiredVersion] [<CommonParameters>]

Detailed Description

Find-Module finds modules from the online gallery that match specified criteria. For each module found, Find-Module returns a PSGetItemInfo object, which optionally can be piped to Install-Module to install the resulting modules.

If the RequiredVersion parameter is not specified, Find-Module returns the latest version of the module that is equal to or greater than the minimum version specified, or the newest version of the module if no minimum version is specified. If the RequiredVersion parameter is specified, Find-Module only returns the version of the module that exactly matches the specified version. Find-Module searches through all available modules, because name conflicts between sources can occur.

Parameters

-MinimumVersion <Version>

Specifies the minimum version of the module to include in results. The MinimumVersion and the RequiredVersion parameters are mutually exclusive; you cannot use both parameters in the same command.

Aliases

Version

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-Name <String[]>

Specifies the names of one or more modules to discover. This parameter supports wildcard characters. If wildcard characters are not specified, only modules that exactly match the specified names are returned. If no matches are found, and you have not used any wildcard characters, the command returns an error. If you use wildcard characters, but do not find matching results, no error is returned. (This follows standard wildcard character matching behavior for Windows PowerShell.)

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-Repository <String[]>

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-RequiredVersion <Version>

Specifies the exact version number of the module to include in the results. The MinimumVersion and the RequiredVersion parameters are mutually exclusive; you cannot use both parameters in the same command.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type

PSGetItemInfo

Notes

This cmdlet runs on Windows PowerShell 3.0 or later releases of Windows PowerShell, on Windows 7 or Windows 2008 R2 and later releases of Windows.

Examples

-------------------------- EXAMPLE 1 --------------------------

This example returns a PSGetItemInfo object that represents the ContosoServer module from the online gallery.

PS C:\>Find-Module -Name ContosoServer
Version       DateUpdated        Name          Description
-------       -----------        ----          -----------
2.0.0.0       5/8/2014 10:30 AM  ContosoServer Cmdlets and DSC resources for managing Contoso Server products.

-------------------------- EXAMPLE 2 --------------------------

This example returns two PSGetItemInfo objects that represent the ContosoServer and ContosoClient modules from the online gallery.

PS C:\>Find-Module -Name Contoso*

-------------------------- EXAMPLE 3 --------------------------

This example returns a PSGetItemInfo object that represents the newest version of the ContosoClient module that has a minimum version of at least 3.0.0.0. For example, if there is a version 4.0.0.0 ContosoClient module, that is included in the results of this command.

PS C:\>Find-Module -Name ContosoClient -MinimumVersion 3.0.0.0

-------------------------- EXAMPLE 4 --------------------------

This example returns a PSGetItemInfo object that represents version 4.5.6.7 of the ContosoClient module. If the specified version 4.5.6.7 isn't found, an error is returned.

PS C:\>Find-Module -Name ContosoClient -RequiredVersion 4.5.6.7

Online Version