Site icon WinCert

Install-Package: No match was found for the specified search criteria and module name ‘AZ’

I recently attended an online Azure Administration course and had to install AZ tools from the PS repository using Powershell 7.x.

I have used the following PS command:

install-module -Name AZ -AllowClobber -Repository PSgallery

Even though I have followed course instructions I was unable to do so as I received the following error message:

WARNING: Unable to resolve package source ‘https://www.powershellgallery.com/api/v2’
Install-Package: No match was found for the specified search criteria and module name ‘AZ’. Try Get-PSRepository to search for all available registered module repositories.

In order to solve this issue, I had to use the -scope attribute.

Install-Module -Name AZ -AllowClobber -Scope CurrentUser

As you can see from the image above I was able to install the ‘AZ’ repository with that command.

Hope this helps you with Install-Package: No match was found for the specified search criteria and module name ‘AZ’ error.

Comments are welcome!

Exit mobile version