3
Vote

Get-Package must support versions

description

After calling Install-Package with a name and required version, I end up with multiple side-by-side installs, but Get-Package and Uninstall-Package don't know about versions and do different things. For example:
[326]: Install-Package Astley -Force

Name                             Version          Status           Source         Summary
----                             -------          ------           ------         -------
Astley                           3.0              Installed        chocolatey

[327]: Install-Package Astley -RequiredVersion 1.0 -Force

Name                             Version          Status           Source         Summary
----                             -------          ------           ------         -------
Astley                           1.0              Installed        chocolatey

[328]: Install-Package Astley -RequiredVersion 2.0 -Force

Name                             Version          Status           Source         Summary
----                             -------          ------           ------         -------
Astley                           2.0              Installed        chocolatey

[329]: Install-Package Astley -RequiredVersion 2.1 -Force

Name                             Version          Status           Source         Summary
----                             -------          ------           ------         -------
Astley                           2.1              Installed        chocolatey

[331]: Install-Package Astley -RequiredVersion 2.2 -Force

Name                             Version          Status           Source         Summary
----                             -------          ------           ------         -------
Astley                           2.2              Installed        chocolatey


[332]: Get-Package                                                                               
                                                                                                 
Name                             Version          Status           Source         Summary        
----                             -------          ------           ------         -------        
Astley                           1.0              Installed        Local File                    
Astley                           2.0              Installed        Local File                    
Astley                           2.1              Installed        Local File                    
Astley                           2.2              Installed        Local File                    
Astley                           3.0              Installed        Local File                    
autoload                         4.1              Installed        Local File                    
PoshCode                         4.0.1.11          Installed        Local File                    
reflection                       4.5              Installed        Local File                    
wasp                             2.5.0.0          Installed        Local File                    
zoomit                           4.50             Installed        Local File     ZoomIt is a scr
                                                                                                 
                                                                                                 
[333]: Get-Package Astley                                                                        
                                                                                                 
Name                             Version          Status           Source         Summary        
----                             -------          ------           ------         -------        
Astley                           1.0              Installed        Local File                    
Get-Package ought, by default to return all versions, not just the oldest. Get-Package and Uninstall-Package really also ought to have a way to return a specific one, this is ridiculous:
[334]: Get-Package Astley | Uninstall-Package

Name                             Version          Status           Source         Summary
----                             -------          ------           ------         -------
Astley                           1.0              Not Installed


[335]: Get-Package Astley

Name                             Version          Status           Source         Summary
----                             -------          ------           ------         -------
Astley                           2.0              Installed        Local File

[335]: Get-Package Astley

Name                             Version          Status           Source         Summary
----                             -------          ------           ------         -------
Astley                           2.0              Installed        Local File


[336]: Uninstall-Package Astley

Name                             Version          Status           Source         Summary
----                             -------          ------           ------         -------
Astley                           2.0              Not Installed


[337]: Get-Package Astley

Name                             Version          Status           Source         Summary
----                             -------          ------           ------         -------
Astley                           2.1              Installed        Local File

comments