Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet

I was trying to install Azure using Install-Module Azure in PowerShell. I got the following error:

PS C:\Windows\system32> Install-Module Azure Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet, function, script file,  or operable program. Check the spelling of the name, or if a path was included, verify that the path is corre ct and try again. At line:1 char:1 + Install-Module Azure + ~~~~~~~~~~~~~~     + CategoryInfo          : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException     + FullyQualifiedErrorId : CommandNotFoundException 

Why is PS not recognizing the basic Install module? Without this I can't even install Azure. What should I do?

like image 952
Martin Erlic Avatar asked Jan 11 '17 08:01

Martin Erlic


People also ask

How do I install a module in PowerShell?

Installing PowerShell modules from the PowerShell Gallery is the easiest way to install modules. To install a package or module from the Gallery, we use the command: Install-Module or Install-Script cmdlet, depending on the package type.

Is not recognized as the name of a cmdlet?

By default, you have to install modules in the exact order to use them. If that module is missing, corrupt, or got moved, it throws up the error, “the term is not recognized as the name of a cmdlet.” You can use “get-module” in PowerShell to see if the module is present and correct.


1 Answers

Since you are using the lower version of PS:

What you can do in your case is you first download the module in your local folder.

Then, there will be a .psm1 file under that folder for this module.

You just

import-Module "Path of the file.psm1"

Here is the link to download the Azure Module: Azure Powershell

This will do your work.

like image 72
Ranadip Dutta Avatar answered Sep 19 '22 19:09

Ranadip Dutta