Open In App

How to Check if a Specific Azure Module is Installed on your System or Not?

There are two ways to check if a specific Azure module is installed on your system. Here in this article will cover both the methods details with step-by-step in order to verify the modules on Windows system. We will also discuss which method is the best way to check the installed Azure modules. Let’s get started!

Method 1: Using the Get-InstalledModule PowerShell cmdlet

For method one, we will be using the Get-InstalledModule PowerShell cmdlet. With the Get-InstalledModule cmdlet you can fetch the information of installed module version, the patch where it was installed and it also lists the cmdlets available to use in that module.



Get-InstalledModule



This command lists all the PowerShell modules installed on your windows system. If the Azure modules are installed, then the output will list all the installed azure modules else it will be empty or it will shows other PowerShell module. To be more specific check the next step.



To check if a specific Azure module is installed on your system, You use the Get-InstalledModule cmdlet and add the parameter name of the Azure module. Check example 1 and example 2 below.

Syntax:

Get-InstalledModule -Name <add module name>



Example 1:

If you want a specific Azure module, such as Az.Storage module then you can use the Get-Module PowerShell cmdlet with the name of the parameter as Az.Storage.

Get-InstalledModule -Name Az.Storage



The output for this cmdlet: If Az.Storage module exits it command will list the Az.Storage module name, version and description of that module. else it will return empty.

Example 2:

Similarly as example 1 you can check the other Azure modules as well. Let’s check for Azure Active Directory module -AzureAD. You can run the following command to check AzureAD module.

Get-InstalledModule -Name AzureAD



This will list the AzureAD name, version and description. else it will return empty output.

Method 2: Using the Get-Module PowerShell cmdlet

In the method 2 will be using the Get-Module PowerShell cmdlet. With this Get-Module command you can fetch the same details as the Get-InstalledModule cmdlet, such as the name, version, path, and list of commands included in a module.

you can see in the output below, I have already installed Azure modules on my system, but this method does not show any installed Azure modules. This is because Get-Module will mostly work for the other PowerShell installed modules to fetch the information but not Azure modules. But this will work in Azure Cloud Shell. Therefore, it always better to use method 1 to verify the installed Azure modules on windows system.

For your reference, run the Get-Module cmdlet by specifying the name of the module that you are searching for on your windows system.

Syntax:

Get-Module -Name <add module name>



Example:

Get-Module -Name PSReadline



Troubleshooting common issues with checking for installed Azure modules.

If you find any issues in finding or updating Azure Modules you may use this article “How To Install and Update Azure PowerShell on Windows Machine?” In this article we have covered the detailed steps to Install Azure PowerShell on Windows and we have also covered the steps to update the existing Azure Modules.

Useful Topics related to this post:

How To Check Azure CLI Modules Using Bash?

To check Azure CLI modules using Bash >> Open Bash, just type az and run the command. This will list all the Azure CLI modules that are currently installed on your system.

az


To check the specific module in Azure CLI, you may follow this system to find az service module and available helpful modules for that service.

Syntax:

az <service name> -h


Example: To list the Azure Virtual machine available commands, run the following command.

az vm -h


To be more specific, you can even mention the context you want for az vm resize

az find "az vm resize"


FAQs On Azure module

1. Is There Any Difference Between These Two Methods?

Yes, there is lot of difference between Get-Module or Get-InstalledModule as can we can see the above results both the methods does not give the same output.

2. Which The Best Method To Check The Azure Modules?

Using Get-InstalledModule cmdlet is the best method to check the installed modules on your system.

3. Can We Install And Use Both Azure PowerShell And Azure CLI Modules On Windows At Once?

Yes, you can Install and use both Azure PowerShell and Azure CLI Modules for managing the Azure resources directly from the command line interface or from the PowerShell.

Article Tags :