Unable to find Install-Module cmdlet in Powershell 5.1 on Window 10


I am getting an below error post deleting the modules in my local machine. Someone please suggest how to start use install-module cmdlet in my laptop machine.


Error :

PS C:\Users\arumugam.murugan> Install-Module -Name Az
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 -Name Az
  • CategoryInfo : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
  • FullyQualifiedErrorId : CommandNotFoundException

Have you tried to use update-help? Make sure you have the current updates.

Check the Install-Module documentation and verify that you are using a supported version of PowerShell.

Install-Module is part of the PowerShellGet module

get-command install-module
    CommandType     Name                  Version    Source
    -----------     ----                  -------    ------
    Function        Install-Module        2.2.5      PowerShellGet

Run the following command:

get-module PowerShellGet -listavailable
        Directory: C:\Program Files\WindowsPowerShell\Modules
    ModuleType Version    Name               ExportedCommands
    ---------- -------    ----               ----------------
    Script     2.2.5      PowerShellGet      {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}

If you don’t get comparable output then Google how to install PowerShellGet

Also you may NOT have PowerShellGet installed. Follow the instructions at: https://docs.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7

You will need to have .NET 4.5 or higher installed. Commands in weblink need to be run from an elevated prompt (Run as Administrator)

After installing the NuGet package provider you can then install PowerShellGet. All instructions are at the weblink.