PowerShellGet icon indicating copy to clipboard operation
PowerShellGet copied to clipboard

PowerShellGet 2.9.0-Preview Get-InstalledModule throws Error

Open BohrenAn opened this issue 2 years ago • 4 comments

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest version
  • [X] Search the existing issues.

Steps to reproduce

I've installed the PowerShellGet 2.9.0-Preview Module Side by Side

Install-Module PowerShellGet -AllowPrerelease -Force

#PowerShell 5.1 Get-Module Get-InstalledModule MicrosoftTeams Get-Module MicrosoftTeams -ListAvailable PowerShellGet_2 9 0_Preview_04

#PowerShell 7.3.7 Import-Module PowerShellGet -RequiredVersion 2.9.0 Get-Module Get-InstalledModule MicrosoftTeams Get-Module MicrosoftTeams -ListAvailable PowerShellGet_2 9 0_Preview_05

Expected behavior

Get-InstalledModule <ModuleName> shows a result

Actual behavior

Get-InstalledModule <ModuleName> throws an Error

Error details

$Error.Clear()
Get-InstalledModule MicrosoftTeams
$Error

Exception calling "GetSteppablePipeline" with "0" argument(s): "The expression after '&' in a pipeline element produced an object that was not
valid. It must result in a command name, a script block, or a CommandInfo object."
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.9.0\PowerShellGet.psm1:772 char:13
+             $steppablePipeline = $scriptCmd.GetSteppablePipeline()
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : RuntimeException

Environment data

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.22621.1778
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.1778
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

and 

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.7
PSEdition                      Core
GitCommitId                    7.3.7
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

5.1 and 7.3.7

Visuals

No response

BohrenAn avatar Sep 19 '23 22:09 BohrenAn

This also occurs consistently with 3.0.22-beta22 in both desktop and core.

Name                           Value
----                           -----
PSVersion                      5.1.20348.1850
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.20348.1850
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Name                           Value
----                           -----
PSVersion                      7.3.7
PSEdition                      Core
GitCommitId                    7.3.7
OS                             Microsoft Windows 10.0.20348
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

brad-simpson avatar Sep 22 '23 18:09 brad-simpson

I just installed PowershellGet 3.0.23 and can confirm this is still an issue

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     3.0.23     beta23     PowershellGet                       {Find-Command, Find-DscResource, Find-Module, Find-RoleCapability…}

Powershell Version:

Name                           Value
----                           -----
PSVersion                      7.3.6
PSEdition                      Core
GitCommitId                    7.3.6
OS                             Microsoft Windows 10.0.23541
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PowershellGet v3 freshly installed

AniTexs avatar Nov 07 '23 11:11 AniTexs

Same here. How to downgrade to 2.2.5? Nevermind deleting the folder "C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\3.0.23" did the trick.

FFreestyleRR avatar Jan 11 '24 21:01 FFreestyleRR

Still an issue, I removed the 3.0... folder to fix it. Any plans to fix it ?

lbouriez avatar Oct 15 '24 13:10 lbouriez