PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

Please add "Set-Module" and "Set-Script"

Open RStadlmair opened this issue 7 years ago • 6 comments

Hi !

Short reason: When publishing to the PSGallery, i´d like to set Module details, as i could do it in the WebUI. Sure this is in the privatedata section, but a later change must be done in the console WebUI

Detailed Reason: Real-world testing of modules and script means publish it to the gallery and then test (i.e. deployment to Azure automation, Pester, ... ). If this is part of the CI/CD pipeline, it also means when a module/script has issues in testing we´d like to hide it after it has been published programmatically.

So a Set-Module command would look like this: Set-Module -Name 'mymodule' -visibility $false

R.

RStadlmair avatar Aug 06 '18 07:08 RStadlmair

We don't want to make it possible to modify a module arbitrarily after it has been published. But providing a programmatic way to make it visible or not is reasonable.

edyoung avatar Sep 19 '18 17:09 edyoung

Is there any progress on this request? What is the chance that we get this functionality any time soon?

kamennikolov avatar Nov 25 '22 08:11 kamennikolov

Actually, based in 3.0.0-beta17 this should then be Set-PSResource.

RStadlmair avatar Nov 25 '22 08:11 RStadlmair

Since the scope of this request has been limited to making a resource listed or unlisted. My recommendation is do one of following:

  • Create Unpublish-PSResource with the functionality to unlist a resource and have Publish-PSResource with a parameter set that can list the resource.

  • Create Hide-PSResource and Show-PSResource that lists and unlists resources.

The Set verb is overloaded in my opinion when people try to shove every config item into a single cmdlet especially when functionality can be broken out to use specific verbs.

ThomasNieto avatar Mar 01 '23 23:03 ThomasNieto

Unpublish-PSResource sounds more to really REMOVE it from the Repository, thats confusing.

So i would prefer:

  • Show/Hide-PSResource CmdLets
  • and a parameter in like Publish-PSResource -hide:$true

Cheers/Roman

RStadlmair avatar Mar 06 '23 12:03 RStadlmair

@SydneyhSmith can we expect this feature request to be prioritized any time soon?

kamennikolov avatar Oct 10 '23 11:10 kamennikolov