How do you list modules in PowerShell?

Image Description

Daily PowerShell #46

Daily PowerShell Modules Basics

December 1, 2021

quote Discuss this Article

List Imported PowerShell Modules

You can use Get-Module to list imported modules.

Get-Module

Output will include only imported modules.

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     2.1.0                 PSReadLine                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSRead…

List All Imported PowerShell Modules

You can include the -All parameter on Get-Module to list all imported modules.

Get-Module -All

This includes nested modules.

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     2.1.0.0               Microsoft.PowerShell.PSReadLine2    {Get-PSReadLineOption, Set-PSReadLineOption, Set-PSReadLineKey…
Script     2.1.0                 PSReadLine                          {Get-PSReadLineKeyHandler, Get-PSReadLineOption, Remove-PSRead…

List Installed PowerShell Modules

You can view all modules available on the system (based on $ENV:PSModulePath) by using the -ListAvailable parameter.

Get-Module -ListAvailable

List PowerShell Modules installed with PowerShellGet

You can view all modules installed with PowerShellGet by using the Get-InstalledModule cmdlet.

Get-InstalledModule