You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In contrast, Find-Module does return the unlisted module when I specify the exact name and version.
Additional Context:
The root3i module specified in my examples was published for test purposes only. All of its versions are unlisted.
Motivation:
We own automation for installing, updating, and uninstalling hundreds of modules. Modules no longer need to be updated and should be removed when the service that they correspond to has been retired/discontinued. There is no property to designate that a module is retired/discontinued. It appears that the best way to indicate that a PowerShell module on PSGallery is retired/discontinued is to unlist all versions. The ability to target unlisted modules with Find-PSResource confirms that a module is indeed unlisted and not just missing because of an issue such as the PSGallery is in a degraded state.
Expected behavior
> Find-PSResource -Name root3i -Version 1.0.0 -Repository PSGalleryName Version Prerelease Repository Description---- ------- ---------- ---------- -----------root3i 1.0.0 PSGallery This is a test module to test publishing
Find-PSResource: Package with name 'root3i', version '1.0.0' could not be found in repository 'PSGallery'
Environment data
ModuleType Version PreRelease Name ExportedCommands
-----------------------------------------------
Binary 1.0.6 Microsoft.PowerShell.PSResourceGet {Find-PSResource,Get-InstalledPSResource,Get-PS…
Key : PSVersion
Value : 7.4.2
Name : PSVersion
Key : PSEdition
Value : Core
Name : PSEdition
Key : GitCommitId
Value : 7.4.2
Name : GitCommitId
Key : OS
Value : Microsoft Windows 10.0.19045
Name : OS
Key : Platform
Value : Win32NT
Name : Platform
Key : PSCompatibleVersions
Value : {1.0,2.0,3.0,4.0…}
Name : PSCompatibleVersions
Key : PSRemotingProtocolVersion
Value : 2.3
Name : PSRemotingProtocolVersion
Key : SerializationVersion
Value : 1.1.0.1
Name : SerializationVersion
Key : WSManStackVersion
Value : 3.0
Name : WSManStackVersion
Visuals
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
Steps to reproduce
I am having a problem with
Find-PSResource
. I am expecting an unlisted module to be returned when I specify the exact name and version but nothing is returned.In contrast,
Find-Module
does return the unlisted module when I specify the exact name and version.Additional Context:
The
root3i
module specified in my examples was published for test purposes only. All of its versions are unlisted.Motivation:
We own automation for installing, updating, and uninstalling hundreds of modules. Modules no longer need to be updated and should be removed when the service that they correspond to has been retired/discontinued. There is no property to designate that a module is retired/discontinued. It appears that the best way to indicate that a PowerShell module on PSGallery is retired/discontinued is to unlist all versions. The ability to target unlisted modules with
Find-PSResource
confirms that a module is indeed unlisted and not just missing because of an issue such as the PSGallery is in a degraded state.Expected behavior
Actual behavior
> Find-PSResource -Name root3i -Version 1.0.0 -Repository PSGallery
Error details
Find-PSResource: Package with name 'root3i', version '1.0.0' could not be found in repository 'PSGallery'
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: