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 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
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*'}
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