Powershell

How to Use Get-InstalledModule (PowerShellGet) Cmdlet in PowerShell?

In PowerShell, the module is simply a package that includes functions, cmdlets, functions, variables, and aliases. PowerShell has multiple numbers of pre-installed modules that can be retrieved using the “Get-InstalledModule” cmdlet. It only retrieves the list of modules that are installed by using the “PowerShellGet” cmdlet on the computer.

The following blog will uncover the details about the “Get-InstalledModule” cmdlet.

How to Use Get-InstalledModule (PowerShellGet) Cmdlet in PowerShell?

The cmdlet “Get-InstalledModule” in PowerShell gets the installed modules. Let’s take a look at some of the below-given examples for a better understanding.

Example 1: Execute the “Get-InstalledModule” Cmdlet to Retrieve the all Installed Modules List

Run the “Get-InstalledModule” cmdlet to retrieve the installed modules:

Get-InstalledModule

 

Example 2: Get the Specific Version of a Module by Running the “Get-InstalledModule” Cmdlet

A single module can be retrieved by executing the following cmdlet:

Get-InstalledModule -Name psexec

 
In the above-stated code:

    • First, write the “Get-InstalledModule” cmdlet.
    • Next, write the “-Name” parameter and specify the value “psexec” value to it:


That’s it! We have compiled the usage of the “Get-InstalledModule” cmdlet.

Conclusion

The “Get-InstalledModule” cmdlet is a built-in PowerShell cmdlet that is used to get the modules list installed by the “PowerShellGet” cmdlet. This post has elaborated on the “Get-InstalledModule” cmdlet with the aid of examples.

About the author

Muhammad Farhan

I am a Computer Science graduate and now a technical writer who loves to provide the easiest solutions to the most difficult problems related to Windows, Linux, and Web designing. My love for Computer Science emerges every day because of its ease in our everyday life.