PowerShell Genie

Find-Module

Use Find-Module to search a registered repository for modules without installing anything.

Command 2 min read Windows PowerShell 5.1 and PowerShell 7

Documentation: Microsoft Learn — PowerShell module reference

Syntax

1PS> Find-Module [[-Name] <string[]>] [-Tag <String[]>] [-Filter <String>] [-RequiredVersion <String>] [-AllVersions] [-Repository <String[]>] [-AllowPrerelease] [<CommonParameters>]
See the command anatomy

Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.

Find-Module [[-Name] <string[]>] [-Tag <String[]>] [-Filter <String>] [-RequiredVersion <String>] [-AllVersions] [-Repository <String[]>] [-AllowPrerelease] [<CommonParameters>]
  1. Stage 1Find-Module-Name -Tag -Filter -RequiredVersion -AllVersions -Repository -AllowPrerelease

    Try it

    Windows PowerShell

    PowerShell example · browser support is limited.

    Execution scope: The full example below requires PowerShell outside this browser. You can edit this runner to use the supported practice commands; unsupported syntax returns an explanation.

    Interactive simulation · fictional data

    Examples

    Find-Module -Name Pester

    1PS> Find-Module -Name Pester | Select-Object Name, Version, PublishedDate, Author
    Show reference output

    Sample output · fictional data, shaped like the real thing

    Name                             Version  PublishedDate  Author
    -------------------------------  -------  -------------  ------
    Microsoft.PowerShell.Management  7.0.0.0
    Pester                           5.5.0

    Find-Module -Tag security

    1PS> Find-Module -Tag security | Select-Object -First 5 Name, Version
    Show reference output

    Sample output · fictional data, shaped like the real thing

    Name                             Version
    -------------------------------  -------
    Microsoft.PowerShell.Management  7.0.0.0
    Pester                           5.5.0

    Find-Module -Name Pester (2)

    1PS> Find-Module -Name Pester -AllVersions | Select-Object Version
    Show reference output

    Sample output · fictional data, shaped like the real thing

    Version
    -------
    7.0.0.0
    5.5.0

    Parameters

    Parameter definitions:

    • -Name
    • -Tag
    • -Filter
    • -RequiredVersion
    • -AllVersions
    • -Repository
    • -AllowPrerelease

    PowerShell module reference on Microsoft Learn

    Practical use and troubleshooting

    Practical scenario: Use Find-Module when you need to search a registered repository for modules without installing anything. Start with one identified target and inspect the returned values before extending the operation to a list. Keep the identity in your report so you can trace each result back to the object or path that produced it.

    Common error and fix: An empty search can mean the intended repository is not registered. Inspect Get-PSRepository and the repository connection before concluding that the module does not exist. In an unattended script, capture this failure with its original error record and record which target failed. An empty result and an unsuccessful query must remain distinguishable in the final report.

    See also: Get-InstalledModule. Find-Module searches configured repositories; Get-InstalledModule reports installations tracked by PowerShellGet. The repository catalog and locally discoverable modules are not the same inventory. Read the linked command before substituting it; similar names do not imply identical inputs or output.

    Find-Module reference on Microsoft Learn

    Recap

    Find-Module Use Find-Module to search a registered repository for modules without installing anything.

    Next: Install-Module
    Genie guideFind-Module

    Use Find-Module to search a registered repository for modules without installing anything. The console below is pre-loaded — run it, then change a value and run it again.