Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No package Az found

$ Get-InstalledModule -Name Az -AllVersions

Version    Name                                Repository           Description
-------    ----                                ----------           -----------
0.5.0      Az                                  PSGallery            Azure Resource Manager Module. Cmdlets to manage...

Above block shows that Az is installed.. But following block says otherwise:

$ Update-Module -Name Az
WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'.
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\1.0.0.1\PSModule.psm1:2089 char:20
+ ...           $sid = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Ex
   ception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
like image 378
Deepak Singhal Avatar asked Apr 12 '19 09:04

Deepak Singhal


People also ask

How do I know if a module is installed AZ?

To determine the version of Azure PowerShell you have installed, run Get-InstalledModule -Name Azure from PowerShell.


Video Answer


1 Answers

Thanks for help to everyone in comments... Here the main problem was the repository itself.. De-registering and registering it back solved the issue.

> Register-PSRepository -Default
like image 111
Deepak Singhal Avatar answered Sep 25 '22 12:09

Deepak Singhal