This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
Find-Module does not allow parameters MinimumVersion and AllVersions to be specified together #676
Open
Description
If I'm synchronizing PSGallery packages to a private Azure Devops feed, I would like to be able to copy versions of PSGallery modules newer than the latest version stored in private Azure Devops feed. Hence, we are specifying a MinimumVersion to Find-Module in order to limit results. Unfortunately, specifying MinimumVersion will only return the latest version, rather than all versions greater than or equal to MinimumVersion. I would prefer avoiding AllVersions parameter because some modules such as dbatools have a lot of versions to sort over.
Steps to reproduce
Find-Module -Name 'aws.tools.common' -MinimumVersion '4.1.36' -Repository PSGallery -AllVersions
Expected behavior
Version Name Repository Description
------- ---- ---------- -----------
4.1.38 AWS.Tools.Common PSGallery The AWS Tools for PowerShell lets develop...
4.1.37 AWS.Tools.Common PSGallery The AWS Tools for PowerShell lets develop...
4.1.36 AWS.Tools.Common PSGallery The AWS Tools for PowerShell lets develop...
Actual behavior
Find-Module: You cannot use the parameter AllVersions with RequiredVersion, MinimumVersion or MaximumVersion in the same command.
Environment data
on Windows
Name Value
---- -----
PSVersion 7.2.1
PSEdition Core
GitCommitId 7.2.1
OS Microsoft Windows 10.0.22000
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
on Ubuntu Linux
Name Value
---- -----
PSVersion 7.2.1
PSEdition Core
GitCommitId 7.2.1
OS Linux 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
> Get-Module -ListAvailable PowerShellGet,PackageManagement
on Windows
Directory: C:\program files\powershell\7\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 1.4.7 PackageManagement Desk {Find-Package, Get-Package, Get-Package…
Script 2.2.5 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-M…
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Binary 1.0.0.1 PackageManagement Desk {Find-Package, Get-Package, Get-Package…
Script 1.0.0.1 PowerShellGet Desk {Install-Module, Find-Module, Save-Modu…
on Ubuntu Linux
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 1.4.7 PackageManagement Desk {Find-Package, Get-Package, Get-Package…
Script 2.2.5 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-M…
> Get-PackageProvider -ListAvailable
on Windows
Name Version DynamicOptions
---- ------- --------------
NuGet 3.0.0.1 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, …
PowerShellGet 2.2.5.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, In…
PowerShellGet 1.0.0.1
on Ubuntu Linux
Name Version DynamicOptions
---- ------- --------------
NuGet 3.0.0.1 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, …
PowerShellGet 2.2.5.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, In…
Metadata
Metadata
Assignees
Labels
No labels