How To List Installed PowerShell Modules

by Robert Allen

Do you need to get all installed PowerShell Modules?

No problem.

You can easily find all installed modules using the Get-Module cmdlet.

Let’s check out some examples.

List all installed PowerShell modules on your computer

The below command will list all installed modules. This does not mean they are loaded into your PowerShell session but are installed and available.

Get-Module -ListAvailable
List all installed PowerShell Modules

List only loaded PowerShell Modules

There are very few modules loaded by default in your current session. Run the command below to view modules loaded in current session.

Get-Module
List modules in current sessions

Search for installed PowerShell Modules

The list of installed modules can be a lot to look at. You can use the where-object filter to search for a specific name (wildcard search). In this example, I’m looking for the exchange module so I search on the keyword “Exchange”

get-module -ListAvailable | Where-object {$_.Name -like '*Exchange*'}
Search installed Modules

Now it shows me only the modules that have the name “Exchange” in them. This is really helpful when you don’t know the full name of the module, you can search for a keyword. In this case, the full module name is “ExchangeOnlineManagement”.

How to Load a PowerShell Module

Now that you know how to list all installed modules and find modules by keyword let’s look at loading a module.

I’m going to load the ExchangeOnlineManagement module with the command below.

Import-Module -Name ExchangeOnlineManagement

When you load a module and run get-module you will now see that listed in the current session.

In the screenshot above you can now see the “ExchangeOnlineManagement” module loaded.

View Module Install Path

There will be multiple paths PowerShell modules are installed.

$env:PSModulePath -split ';'   

I hope you enjoyed this short how to guide on how to get a list of installed PowerShell Modules. Post your questions below.

Related: How to install PowerShell Modules

Recommended Tools

  • AD Cleanup Tool - Find stale and inactive user and computer accounts in Active Directory. Export, disable, move or delete the stale accounts to increase security.
  • AD User Creation Tool - Bulk import or update Active Directory user accounts. Add users to groups, import into OUs, set multiple attributes and more.
  • NTFS Permissions Tool - Scan and audit NTFS folder permissions. See which users and groups have access to what.
  • AD Reporting Tool - Over 200 reports on users, computers, groups, OUs and more. Customize reports or create your own reports with the report builder.

2 thoughts on “How To List Installed PowerShell Modules”

  1. Any suggestions on how to remove a Powershell Module? I installed the wrong version of nxtools module – but I am unable to remove it with the “Remove-Module” command (whether or not I include the “-Force” option). However, the module does show when I list installed modules via the “get-module -ListAvailable | Where-object {$_.Name -like ‘*nxtools*’} ” command.

    Reply
    • You should be able to delete it manually by removing the folder. If you don’t know where it is located run this command

      (Get-Module -ListAvailable).path

      Reply

Leave a Comment