Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Add `Unpublish-PSResource` command to unlist/hide module versions programmatically

Aberta
#1,929 0 comentários 2 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
csharp, powershell
Domínio
cli

Direção de pesquisa

Comece lendo os caminhos de comando existentes de Publish-PSResource e Find-PSResource e, em seguida, inspecione o comportamento de unlisting e de permissões da PowerShell Gallery API. O trabalho estará concluído quando Unpublish-PSResource puder direcionar versões estáveis ou prerelease específicas, aceitar uma chave de API e processar entradas de pipeline para vários recursos.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Area-Publish feature_request
Summary of the new feature / enhancement

As a PowerShell user automating module publishing workflows, I want a command to quickly unlist or hide specific versions of a module (such as prereleases after the full version is published), so that I can ensure only relevant versions are visible on the PowerShell Gallery without manual UI steps.

Currently, unlist functionality exists in the PowerShell Gallery UI and is also supported via API key permissions, but there is no native PowerShell command to do this in automation scenarios. This limits streamlined management when transitioning from prerelease to stable versions or when hiding obsolete/pre-release versions is required within CI/CD systems.

Proposed technical implementation details (optional)

Add a new cmdlet named Unpublish-PSResource. It should accept similar parameters as Find-PSResource, with the addition of -ApiKey (similar to Publish-PSResource). This command would use the API key (with appropriate unlist permission) to programmatically unlist or hide the specified package version on the Gallery.

The command should support:

  • Specifying a specific version (including prerelease versions) to unlist
  • Pipeline input from Find-PSResource to unpublish multiple resources at once

Example usage:

Unpublish-PSResource -Repository PSGallery -ApiKey $APIKey -Name $moduleName -Version 2.0.1 -Prerelease

# Unpublish multiple versions via pipeline
Find-PSResource -Name $moduleName -Version "2.0.1" -Prerelease | Unpublish-PSResource -Repository PSGallery -ApiKey $APIKey

This feature would greatly improve automation workflows for module publishers and mirror the manual UI and API support for unlisting that already exists.

Linguagem predominante
C#
Estrelas
578
Forks
114
Merge médio
10h 4min
PRs com merge (30d)
4

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de PowerShell/PSResourceGet

Todas as issues de PowerShell/PSResourceGet

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.