Skip to content

Installing Az PowerShell module from PowerShell Gallery results in 500 error #336

@Adunaphel

Description

@Adunaphel

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

Using Install-PSResource to install the Az PowerShell module, results in an http 500 error for the Az.ContainerRegistry package:

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&%24inlinecount=allpages&%24skip=0&%24orderby=NormalizedVersion+desc&id=%27Az.ContainerRegistry%27'
Install-PSResource: Package(s) 'Az' could not be installed from repository 'PSGallery'.

Using Install-Module for the same purpose does still work.

Expected behavior

Az PowerShell module is installed

Actual behavior

Nothing gets installed

Error details

Exception             :
    Type    : Microsoft.PowerShell.PSResourceGet.UtilClasses.ResourceNotFoundException
    Message : Package(s) 'Az' could not be installed from repository 'PSGallery'.
    HResult : -2146233088
TargetObject          : Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource
CategoryInfo          : InvalidData: (Microsoft.PowerShel…s.InstallPSResource:InstallPSResource) [Install-PSResource],
ResourceNotFoundException
FullyQualifiedErrorId : InstallPackageFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource
InvocationInfo        :
    MyCommand        : Install-PSResource
    ScriptLineNumber : 1
    OffsetInLine     : 2
    HistoryId        : 1
    Line             :  Install-PSResource -Name Az -Repository PSGallery -Scope AllUsers -PassThru -Quiet -Reinstall
    Statement        : Install-PSResource -Name Az -Repository PSGallery -Scope AllUsers -PassThru -Quiet -Reinstall
    PositionMessage  : At line:1 char:2
                       +  Install-PSResource -Name Az -Repository PSGallery -Scope AllUsers -P …
                       +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    InvocationName   : Install-PSResource
    CommandOrigin    : Internal
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo :
      0
      1

Environment data

Name                           Value
----                           -----
PSVersion                      7.5.4
PSEdition                      Core
GitCommitId                    7.5.4
OS                             Ubuntu 25.10
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

7.5.4

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions