How to List Installed PowerShell Modules

One of my client recently wanted to get the installed modules from their system. It is easy to achieve using PowerShell.

In this tutorial, I will explain how to list installed PowerShell modules using different methods, especially using the Get-Module cmdlet with -ListAvailable parameter.

Method 1: Using Get-Module -ListAvailable

One of the most reliable ways I use to list all installed modules in PowerShell is with the Get-Module -ListAvailable cmdlet. This command scans all module directories and returns every module available on your system, regardless of whether it’s loaded in your current session.

Get-Module -ListAvailable

This method gives you a complete overview, including the module name, version, and path. It’s my go-to for a thorough audit, especially when onboarding new servers or workstations in various environments.

You can see the exact output in the screenshot below:

powershell list installed modules

Check out PowerShell Format-List

Filter by Module Name

Sometimes, I need to check if a specific module, such as AzureAD or ExchangeOnlineManagement, is installed. You can easily filter the results by name:

Get-Module -ListAvailable -Name 'AzureAD'

This approach is invaluable when you’re troubleshooting scripts that depend on certain modules. It quickly tells you if the module is present and which versions are available.

Display Key Properties in a Table

For a more organized view, you can select key properties and display them in a table. This makes it easier to scan through results, especially when working with large environments.

Get-Module -ListAvailable | Select-Object Name, Version, Path | Format-Table -AutoSize

This command outputs a clean table with just the information you need: module name, version, and installation path.

Here is the exact output in the screenshot below:

List Installed PowerShell Modules

Check out Convert CSV to HTML Table in PowerShell

Method 2: Using Get-InstalledModule (PowerShellGet)

If you’re managing modules installed via the PowerShell Gallery, Get-InstalledModule is perfect. This cmdlet shows only the modules installed using PowerShellGet, which is helpful for managing company-approved modules.

Get-InstalledModule

This method is especially useful in environments where you want to distinguish between modules installed via the Gallery and those that are built-in or manually copied. You’ll see details like name, version, and repository source.

Filter Installed Modules by Version

Sometimes, compliance requires certain module versions. I routinely filter by version to ensure standards are met:

Get-InstalledModule | Where-Object { $_.Version -ge '2.0.0' }

This command helps you quickly identify modules that need to be updated or rolled back to meet your organization’s requirements.

Read PowerShell Select-String -AllMatches Examples

Method 3: Listing Loaded Modules in the Current Session

If you want to see only the modules currently loaded in your PowerShell session, use Get-Module without parameters. This is useful for debugging scripts or understanding your session’s current state.

Get-Module

This command lists only the modules that are actively imported, making it easy to see what’s in memory and troubleshoot issues related to module conflicts.

Method 4: Exploring Module Paths

PowerShell modules can be installed in different locations, such as:

  • User Profile: C:\Users\Bijay\Documents\WindowsPowerShell\Modules
  • System-Wide: C:\Program Files\WindowsPowerShell\Modules
  • Windows Directory: C:\Windows\System32\WindowsPowerShell\v1.0\Modules

To view all module paths that PowerShell checks, run:

$env:PSModulePath -split ';'

Knowing where your modules reside helps with manual management, especially when deploying scripts across multiple user profiles or servers.

Read PowerShell Curl

Method 5: Exporting Module Lists for Auditing

In regulated industries, you may need to export the list of installed modules for compliance reports. Here’s how I do it:

Get-Module -ListAvailable | Select-Object Name, Version, Path | Export-Csv -Path "C:\IT\PowerShellModules-USA.csv" -NoTypeInformation

This creates a CSV file that can be shared with auditors or team members, ensuring everyone is on the same page.

Quick Reference Table: Listing PowerShell Modules

MethodCommand ExampleBest Use Case
All Available ModulesGet-Module -ListAvailableFull inventory audit
Filter by NameGet-Module -ListAvailable -Name 'AzureAD'Check for specific modules
Gallery-Installed ModulesGet-InstalledModuleModules from PowerShell Gallery
Loaded in SessionGet-ModuleDebugging current scripts
Export to CSV`Get-Module -ListAvailableSelect Name,Version,Path
Show Module Paths$env:PSModulePath -split ';'Manual management and troubleshooting

I hope this tutorial helps you learn how to list installed modules in PowerShell. Do let me know if you still have any questions.

You may also like:

100 PowerShell cmdlets download free

100 POWERSHELL CMDLETS E-BOOK

FREE Download an eBook that contains 100 PowerShell cmdlets with complete script and examples.