Find-ModuleFind-Module

Localiza módulos de uma galeria online que correspondam a critérios especificados.Finds modules from an online gallery that match specified criteria.

DescriçãoDescription

Find-Module descobre os módulos de repositórios registrados que correspondem aos critérios especificados.Find-Module discovers the modules from registered repositories that matches the specified criteria. Para cada módulo encontrado, Find-Module retorna um objeto PSRepositoryItemInfo que pode, opcionalmente, ser redirecionado para Install-Module para instalar os módulos.For each module found, Find-Module returns a PSRepositoryItemInfo object which can optionally be piped to Install-Module for installing the modules.

  • Find-Module pode filtrar com base no conteúdo do módulo com os parâmetros -Command, -DscResource, -RoleCapability e -Includes.Find-Module can filter based on module contents with the -Command, -DscResource, -RoleCapability and -Includes parameters.
  • Find-Module pode filtrar segundo os parâmetros de versão: MinimumVersion, MaximumVersion, RequiredVersion, AllVersions.Find-Module can filter with version parameters: MinimumVersion, MaximumVersion, RequiredVersion, AllVersions.
    • Esses parâmetros são mutuamente exclusivos, exceto MinmimumVersion e MaximumVersion.These parameters are mutually exclusive, except MinmimumVersion and MaximumVersion.
    • Esses parâmetros de versão são permitidos apenas com o nome exclusivo do módulo, sem curingas.These version parameters are allowed only with the single module name without any wildcards.
    • Se o parâmetro RequiredVersion não for especificado, Find-Module retorna a versão mais recente do módulo que for igual ou maior que a versão mínima especificada ou a versão mais recente do módulo se nenhuma versão mínima tiver sido especificada.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 latest version of the module if no minimum version is specified.
    • Se o parâmetro RequiredVersion for especificado, Find-Module retorna apenas a versão do módulo que corresponde exatamente à versão especificada.If the RequiredVersion parameter is specified, Find-Module only returns the version of module that exactly matches the specified version.
  • Find-Module pode filtrar nos metadados do módulo com o parâmetro -TagFind-Module can filter on module metadata with the -Tag parameter
  • Find-Module pode filtrar na linguagem de pesquisa específica do repositório com o parâmetro -Filter.Find-Module can filter on repository-specific search language with the -Filter parameter.
  • Find-Module pode filtrar módulos de todos ou de alguns dos repositórios registrados.Find-Module can filter on modules from all or few of the registered repositories.

Sintaxe do cmdletCmdlet syntax

Get-Command -Name Find-Module -Module PowerShellGet -Syntax

Referência da ajuda online sobre cmdletsCmdlet online help reference

Find-ModuleFind-Module

Comandos de exemploExample commands

# Find a specific module
Find-Module Azure

Version    Name                                Repository           Description
-------    ----                                ----------           -----------
1.3.2      Azure                               PSGallery            Microsoft Azure PowerShell - Service Management

# Find multiple modules
Find-Module Azure,AzureRM

# Find modules with wildcards in -Name
Find-Module -Name AzureRM*

# Find all versions of a module
Find-Module -Name PSReadline -AllVersions

# Find a module with -MinimumVersion. 
# With MinimumVersion we can find a module whose version is greate than or equal to the specified MinimumVersion value.
Find-Module -Name PSReadline -MinimumVersion 1.0.0.12

# Find a module with MaximumVersion
Find-Module -Name PSReadline -MaximumVersion 1.0.0.13

# Find a module with both MinimumVersion and MaximumVersion range.
Find-Module -Name PSReadline -MinimumVersion 1.0.0.12 -MaximumVersion 1.0.0.13

# Find a module with exact version
Find-Module -Name AzureRM -RequiredVersion 1.3.2

# Find a module from the specified repository
Find-Module -Name Contoso -Repository MyLocalRepo

# Find available modules from all registered repositories
Find-Module

# Find available modules from few registered repositories
Find-Module -Repository PSGallery,PrivatePSGallery

# Find a module along with its dependencies
Find-Module -Name AzureRM -IncludeDependencies

# Find all modules with Dsc resources
Find-Module -Includes DscResource

# Find modules with a specific DscResource
Find-Module -DscResource xFirewall

# Find all modules with cmdlets
Find-Module -Includes Cmdlet

# Find all modules with functions
Find-Module -Includes Function

# Find all modules with Role Capabilities
Find-Module -Includes RoleCapability

# Find all modules with the specified Role Capability name
Find-Module -RoleCapability RoleCap1
Find-Module -RoleCapability RoleCap2 -Includes RoleCapability

# Find modules with specific commands
Find-Module -Command Get-ScriptAnalyzerRule, Invoke-ScriptAnalyzer
Find-Module -Command Get-ScriptAnalyzerRule, Invoke-ScriptAnalyzer -Includes Cmdlet
Find-Module -Command Get-ScriptAnalyzerRule, Invoke-ScriptAnalyzer -Includes Function

# Find modules with -Filter based search. -Filter searches in description and names
Find-Module -Filter Cookbook
Find-Module -Filter RBAC
Find-Module -Filter 'App Domain' -Includes 'DscResource'

# Find all modules with tags Azure or DSC
Find-Module -Tag Azure, DSC

# Properties of Find-Module returned object
Find-Module AzureRM.Profile | Format-List * -Force

Name                       : AzureRM.profile
Version                    : 1.0.8
Type                       : Module
Description                : Microsoft Azure PowerShell - Profile credential management cmdlets for Azure Resource
                             Manager
Author                     : Microsoft Corporation
CompanyName                : {elogeel, azure-sdk}
Copyright                  : Microsoft Corporation. All rights reserved.
PublishedDate              : 5/4/2016 9:40:33 PM
InstalledDate              :
UpdatedDate                :
LicenseUri                 : https://raw.githubusercontent.com/Azure/azure-powershell/dev/LICENSE.txt
ProjectUri                 : https://github.com/Azure/azure-powershell
IconUri                    :
Tags                       : {PSModule}
Includes                   : {Function, RoleCapability, Command, DscResource...}
PowerShellGetFormatVersion :
ReleaseNotes               : https://github.com/Azure/azure-powershell/blob/dev/ChangeLog.md
Dependencies               : {}
RepositorySourceLocation   : https://www.powershellgallery.com/api/v2/
Repository                 : PSGallery
PackageManagementProvider  : NuGet
AdditionalMetadata         : {downloadCount, description, copyright, FileList...}