-
Notifications
You must be signed in to change notification settings - Fork 101
Closed
Labels
Description
Steps to reproduce
Find-Command -Name 'Get-AzVM' -AllVersionsExpected behavior
A list commands with their respective modules
Actual behavior
PS> Find-Command -Name 'Get-AzVM' -AllVersions
PowerShellGet\Find-Module : The RequiredVersion, MinimumVersion, MaximumVersion, AllVersions or AllowPrerelease parameters are allowed only when you specify a single name as the value of the Name parameter, without any wildcard
characters.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.1.2\PSModule.psm1:8433 char:9
+ PowerShellGet\Find-Module @PSBoundParameters |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Find-Module], ArgumentException
+ FullyQualifiedErrorId : VersionParametersAreAllowedOnlyWithSingleName,Find-ModuleEnvironment data
PS> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.16299.1004
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.1004
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1But also same behavior here
PS> $PSVersionTable
Name Value
---- -----
PSVersion 6.1.3
PSEdition Core
GitCommitId 6.1.3
OS Microsoft Windows 10.0.16299
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0For PowerShell Core
PS> Get-Module -ListAvailable PowerShellGet,PackageManagement
Directory: C:\Users\Luc\Documents\PowerShell\Modules
ModuleType Version Name PSEdition ExportedCommands
---------- ------- ---- --------- ----------------
Script 1.3.1 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 1.2.4 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 2.1.2 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}
Script 2.0.3 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}
Directory: C:\Program Files\PowerShell\Modules
ModuleType Version Name PSEdition ExportedCommands
---------- ------- ---- --------- ----------------
Script 1.2.4 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 1.2.2 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 2.0.3 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}
Script 2.0.1 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}
Directory: C:\program files\powershell\6\Modules
ModuleType Version Name PSEdition ExportedCommands
---------- ------- ---- --------- ----------------
Script 1.1.7.2 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 1.6.7 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}For PowerShell 5.1
PS> Get-Module -ListAvailable PowerShellGet,PackageManagement
Directory: C:\Users\Luc\Documents\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.2.4 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 2.0.3 PowerShellGet {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.3.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 1.2.2 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 2.1.2 PowerShellGet {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}
Script 2.0.1 PowerShellGet {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}
Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}For PowerShell Core
PS> Get-PackageProvider -ListAvailable
Name Version DynamicOptions
---- ------- --------------
NuGet 3.0.0.1 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate
PowerShellGet 2.1.2.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, AllowPrereleaseVersions, Filter, Tag, Includes, DscResourc...
PowerShellGet 2.0.3.0
PowerShellGet 2.0.1.0
PowerShellGet 1.6.7.0For PowerShell 5.1
PS> Get-PackageProvider -ListAvailable
Name Version DynamicOptions
---- ------- --------------
msi 3.0.0.0 AdditionalArguments
msu 3.0.0.0
nuget 2.8.5.208
NuGet 3.0.0.1 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate
PowerShellGet 2.1.2.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, AllowPrereleaseVersions, Filter, Tag, Includes, DscResource, RoleCapability, Command, Ac...
PowerShellGet 2.0.3.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, AllowPrereleaseVersions, Filter, Tag, Includes, DscResource, RoleCapability, Command, Ac...
PowerShellGet 2.0.1.0
PowerShellGet 1.0.0.1
Programs 3.0.0.0 IncludeWindowsInstaller, IncludeSystemComponent