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
There seems to be two types of behavior for the Version parameter when accepting a version range.
Any version matching the range criteria has the action performed:
Find-PSResource
Get-PSResource
Uninstall-PSResource
Only the highest version matching the range criteria is used:
Install-PSResource
Update-PSResource
Save-PSResource
This could lead to some confusion with the different behaviors for version ranges when the various commands. In NuGet the version range only returns the highest version that matches the range. I don't know the best resolution for this issue is but it might just need to be documentation or a bit more.
Here are some ideas:
Update Find-PSResource to only return the highest version for a given version range to match install, update, and save. Then add a switch parameter to return all versions that meet the version range.
Change Get-PSResource and Uninstall-PSResource to not accept ranges or just document the behavior difference in help.
Expected behavior
See description
Actual behavior
See description
Error details
No response
Environment data
Name Version
-----------
PowerShellGet 3.0.14
Name Value
---------
PSVersion 7.2.5
PSEdition Core
GitCommitId 7.2.5
OS Microsoft Windows 10.0.19043
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Activity