Issues Installing or Updating Az Module to Latest Version

0
4
Asked By TechieChick42 On

I'm having trouble updating the Az module to version 15.2.0 or higher, and I can't even install those newer versions. Every time I try running `Install-PsResource -Name Az -TrustRepository` or `Update-PsResource -Name Az -TrustRepository`, I get a 500 Internal Server Error response. The error says:

`Install-PSResource: 'Response status code does not indicate success: 500 (Internal Server Error).' Request sent: 'https://www.powershellgallery.com/api/v2/FindPackagesById()?%24filter=NormalizedVersion+ge+%275.0.1%27+and+NormalizedVersion+le+%275.0.19%27+and+Id+eq+%27Az.ContainerRegistry%27...`

Interestingly, I can install versions older than 15.2.0 using `Install-PsResource -Name Az -TrustRepository -Version 15.1.0`. Has anyone else faced this issue? I also created a GitHub issue about it [here](https://github.com/Azure/azure-powershell/issues/29173).

2 Answers

Answered By CloudGuru99 On

Have you considered just installing the specific modules you actually need instead of the entire Az module? It might streamline things a bit. Still, logging an issue on GitHub is definitely a smart move to get this addressed.

TechieChick42 -

I totally understand that, but I use so many Azure features that I prefer having all the modules at my fingertips without picking and choosing. My main concern here is that the module installer itself seems to be malfunctioning.

Answered By CodeNinja88 On

It seems like this might be an issue with the PowerShell Gallery. I tried accessing the same URI you mentioned, and it throws an error for me too. However, if you remove the version filter, it works fine. You could check your version of `psget` as well. Maybe give `Install-Module` a shot with an older version?

ScriptMaster25 -

I get what you're saying, but I don't want to go back to the old module installation method. I think this is related to the Az module version; since it encapsulates multiple other modules, there might be something off with it, especially since the error specifically happens with the Az.ContainerRegistry loader.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.