Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerShellGet 2.9.0-Preview Get-InstalledModule throws Error #44

Open
3 tasks done
BohrenAn opened this issue Sep 19, 2023 · 4 comments
Open
3 tasks done

PowerShellGet 2.9.0-Preview Get-InstalledModule throws Error #44

BohrenAn opened this issue Sep 19, 2023 · 4 comments

Comments

@BohrenAn
Copy link

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • 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

@brad-simpson
Copy link

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

@AniTexs
Copy link

AniTexs commented Nov 7, 2023

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

@FFreestyleRR
Copy link

FFreestyleRR commented Jan 11, 2024

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.

@lbouriez
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants