<p>I recently attended an online Azure Administration course and had to install AZ tools from the PS repository using Powershell 7.x.</p>
<p>I have used the following PS command:</p>
<p><strong>install-module -Name AZ -AllowClobber -Repository PSgallery</strong></p>
<p>Even though I have followed course instructions I was unable to do so as I received the following error message:</p>
<p><strong>WARNING: Unable to resolve package source &#8216;https://www.powershellgallery.com/api/v2&#8217;<br />
</strong><strong>Install-Package: No match was found for the specified search criteria and module name &#8216;AZ&#8217;. Try Get-PSRepository to search for all available registered module repositories.</strong></p>
<p><img class="alignnone size-full wp-image-4700" src="https://www.wincert.net/wp-content/uploads/2022/07/az-install-error4.jpg" alt="" width="934" height="83" /></p>
<p>In order to solve this issue, I had to use the <strong>-scope</strong> attribute.</p>
<p><strong>Install-Module -Name AZ -AllowClobber -Scope CurrentUser</strong></p>
<p><img class="alignnone wp-image-4702 size-full" title="Install-Package: No match was found for the specified search criteria and module name 'AZ'" src="https://www.wincert.net/wp-content/uploads/2022/07/az-install-error.jpg" alt="" width="925" height="116" /></p>
<p>As you can see from the image above I was able to install the &#8216;AZ&#8217; repository with that command.</p>
<p><img class="alignnone wp-image-4704 size-full" title="Install-Package: No match was found for the specified search criteria and module name 'AZ'" src="https://www.wincert.net/wp-content/uploads/2022/07/az-install-error-2.jpg" alt="" width="952" height="130" /></p>
<p>Hope this helps you with <strong>Install-Package: No match was found for the specified search criteria and module name &#8216;AZ&#8217;</strong> error.</p>
<p>Comments are welcome!</p>

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