Get-InstalledModule
Use Get-InstalledModule to list modules installed by Install-Module, with the version and repository they came from.
Documentation: Microsoft Learn — PowerShell module reference
Syntax
See the command anatomy
Inspect this authored example with fictional data in the bounded browser model. The numbered stages show how its objects change.
Get-Module -ListAvailable | Measure-Object | Select-Object Count- Stage 1Get-Module
-ListAvailable - Stage 2Measure-Object
Positional values or no named parameters - Stage 3Select-Object
Positional values or no named parameters
Try it
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.
Follow the objects
Run the command to inspect each stage.
Examples
Select Name, Version, Repository
Show reference output
Illustrative output · values vary by environment
Name Version Repository ------------------------------- ------- ---------- Microsoft.PowerShell.Management 7.0.0.0 Pester 5.5.0
Filter by Count
Show reference output
Illustrative output · values vary by environment
Count Name ----- ---- 2 SampleA 1 SampleB
Select Count
Show reference output
Illustrative output · values vary by environment
Count ----- 3
Parameters
Parameter definitions:
-Name-RequiredVersion-MinimumVersion-AllVersions-AllowPrerelease
Practical use and troubleshooting
Practical scenario: Use Get-InstalledModule when you need to list modules installed by Install-Module, with the version and repository they came from. 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: A module imported from a copied folder may not appear here. Check Get-Module -ListAvailable as well and distinguish manual deployment from a PowerShellGet-managed installation. 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: Find-Module. 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.
Recap
Get-InstalledModule Use Get-InstalledModule to list modules installed by Install-Module, with the version and repository they came from.
Next: Get-Module