Menu Title

Install-Module is not recognized as the name of a cmdlet, function, script file, or operable program

By default, Install-Module cmdlet is not recognized on Windows 2012 R2 server. When running Install-Module on PowerShell, you will receive an error saying

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 correct and try
again.
At line:1 char:1
+ Install-Module AzureAD
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

InstallModule

The reason for this error is that you are running older version of Powershell on your server. You need to update to 5 or greater. You can identify PowerShell version on the server by running $PSVersionTable.PSVersion command.

PowerShell_Version

In order to resolve this problem,

  1. Download Windows Management Framework 5.1.
  2. Choose Win8.1AndW2K12R2 version and Install
  3. Setup requires you to restart server

 

InstallModule Patch PowerShell Upgrade

 

You may also like...

Thank you for visiting us. To continue receiving updates, please Subscribe to our Social Media Channels.