Azure Resource Manager modules

Tushar Vasant Dalvi 1 Reputation point

While running the below script i am getting the error.

Install-Module -Name Az -MinimumVersion 5.1.0 -AllowClobber -Scope AllUsers


PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'Az'. Try Get-PSRepository to see all available registered module repositories.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\\PSModule.psm1:1772 char:21

  • ... $null = PackageManagement\Install-Package @PSBoundParameters
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
  • FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,280 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 24,246 Reputation points Microsoft Employee

    Hello, @Tushar Vasant Dalvi !

    What version of PowerShell are you using? This is the list of initial troubleshooting steps:

    • Repository registry: If your repository registry is in a bad state, you may need to unregister and then register the repository again (Register-PSRepository -Default, where -Default registers PSGallery).
    • TLS 1.2: Some people have reported success when using TLS 1.2 by running [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    • Scope: Although you've set your scope here, setting -scope to currentuser may be helpful

    Let me know if this worked for you! If not, we can do some more troubleshooting.


    0 comments No comments