Skip to content

I cannot publish a module that contains more than 5000 cmdlets in the PSGallery #246

@kamennikolov

Description

@kamennikolov

Prerequisites

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

Steps to reproduce

We have an existing module (VMware.Sdk.Nsx.Policy) that recently went above 5000 cmdlets. We have all the cmdlets listed in the CmdletsToExport section in the psd1 file in order for the auto-import feature to work properly. However we are unable to publish this module in the PowerShell gallery. The error message we're getting is: Publish-PSResource: Repository 'PSGallery': Response status code does not indicate success: 500 (You module metadata exceeds allowed size of 5000 nodes.).

Expected behavior

Module should be published successfully

Actual behavior

Publish-PSResource: Repository 'PSGallery': Response status code does not indicate success: 500 (You module metadata exceeds allowed size of 5000 nodes.)

Error details

Exception             :
    Type    : System.ArgumentException
    Message : Repository 'PSGallery': Response status code does not indicate success: 500 (You module
 metadata exceeds allowed size of 5000 nodes.).
    HResult : -2147024809
CategoryInfo          : PermissionDenied: (:) [Publish-PSResource], ArgumentException
FullyQualifiedErrorId : HTTPRequestError,Microsoft.PowerShell.PowerShellGet.Cmdlets.PublishPSResource
InvocationInfo        :
    MyCommand        : Publish-PSResource
    ScriptLineNumber : 1
    OffsetInLine     : 1
    HistoryId        : 4
    Line             : Publish-PSResource -Path "C:\Users\knikolov\OneDrive - VMware, Inc\VMwareCorp\Documen
ts\PowerShell\Modules\KamenModule" -ApiKey <apikey> -Repository PSGallery
    PositionMessage  : At line:1 char:1
                       + Publish-PSResource -Path "C:\Users\knikolov\OneDrive - VMware, Inc\VM …
                       + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    InvocationName   : Publish-PSResource
    CommandOrigin    : Internal
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo :

Environment data

PS C:\Users\knikolov> Get-Module PowerShellGet

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     3.0.17     beta17     PowerShellGet                       {Find-PSResource, Get-PSResource, Get-PSResourceR…

PS C:\Users\knikolov> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.7
PSEdition                      Core
GitCommitId                    7.2.7
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

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