PowerShell: How to Check if a Module is Already Installed


If you are not sure if a PowerShell module is already being installed on your device or not, then you can make use of the Get-Module cmdlet as follows,


Syntax:

Get-Module -ListAvailable -Name name-of-the-module

Example:

Get-Module -ListAvailable -Name ThreadJob

If the module is already available, you will see details about it when you press enter.

Directory: /usr/local/microsoft/powershell/7/Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Binary     2.0.3                 ThreadJob                           Desk      Start-ThreadJob

If the module is not present, you come back to the blank PowerShell prompt i.e. you will see no output.

PowerShell Check if a Module is Already Installed Example

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap