Skip to content

GetSteppablePipeline RuntimeException #58

Description

@TezzKF

Prerequisites

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

Steps to reproduce

Date 20-11-2023
following the documentation:
git clone https://github.com/PowerShell/PowerShellGet
cd path/to/PowerShellGet (substituted with my own path)
Import-Module src/PowerShellGet -Force

Getting issues with
New_Alias: The alias is not allowed, because an alias with the name 'fimo' already exists.
Solving issue by changing alias to 'fimoN' (same with other aliasses)

running command again: Import-Module src/PowerShellGet -Force
(no feedback this time, does not know whether is succesful or not)

running command:
Install-Module -Name PowerShellGet -RequiredVersion 2.2.5 -Allowclobber -Force -Debug -Verbose
Getting the next error:
error

Expected behavior

PowerShellGet installed in version 2.2.5

Actual behavior

RuntimeException

Error details

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:\xxx\Downloads\PowerShellGet\src\PowerShellGet.psm1:1148 char:13
+             $steppablePipeline = $scriptCmd.GetSteppablePipeline()
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : RuntimeException

Environment data

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

Version

PowerShell version 5.1

Visuals

No response

Activity

  1. TezzKF commented on Nov 20, 2023

    @TezzKF
    Author

    Mine main course was following
    https://learn.microsoft.com/en-us/powershell/gallery/powershellget/update-powershell-51?view=powershellget-3.x
    to upgrade PowershellGet under PowerShell-5.1

    When I run Install-Module PowerShellGet -AllowClobber -Force
    I get error
    Exception in Test-MicrosoftCertificate function: Unable to find type
    [Microsoft.PowerShell.Commands.PowerShellGet.Win32Helpers].
    So mine second approach was the one i described above.

  2. skaempfer commented on Dec 29, 2023

    @skaempfer

    Same error here when trying to use version 3.0.23-beta23 of PowerShellGet via PowerShellGet installation in PS Core.

    Reproduction:

    1. Install-Module PowerShellGet -version "3.0.23-beta23" -AllowPrerelease -Repository PSGallery
    2. Open new PowerShell
    3. Import-Module -Name PowerShellGet
    4. Get-Module lists PowerShellGet in version 3.0.23-beta23
    5. Get-PSRepository and Register-PSRepository throw the following error:
    ParentContainsErrorRecordException: 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."
    

    Environment

    Name                           Value
    ----                           -----
    PSVersion                      7.3.10
    PSEdition                      Core
    GitCommitId                    7.3.10
    OS                             Microsoft Windows 10.0.19045
    Platform                       Win32NT
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
    PSRemotingProtocolVersion      2.3
    SerializationVersion           1.1.0.1
    WSManStackVersion              3.0
    
  3. LarryWisherMan commented on Mar 11, 2024

    @LarryWisherMan

    The issue seems related to $WrappedCmd and it being null when trying to call commands from the Microsoft.PowerShell.PSResourceGet module.

    A workaround I found was installing this module

    Install-Module -Name Microsoft.PowerShell.PSResourceGet

    Not sure if this being phased out - or if the dependency is needed before the prerelease module is used.

  4. deadlydog commented on Mar 13, 2024

    @deadlydog

    I had this same issue. Unfortunately, I couldn't even install PSResourceGet because the Install-Module command was broken with the Exception calling "GetSteppablePipeline" with "0" argument(s) error. I ended up having to view the module paths with $env:PSModulePath and I found the newer PowerShellGet module at C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\3.0.23, so I deleted that directory.

    Once I deleted the new PowerShellGet version I was able to use Install-Module -Name Microsoft.PowerShell.PSResourceGet and have been updating my scripts to use Install-PSResource instead of Install-Module.

    So the root issue seems to be that Install-Module is broken in PowerShellGet v3.0.23 and the workaround is to either use PowerShellGet 2.2.5 (the last stable version), or update to use Microsoft.PowerShell.PSResourceGet (which is the future way to manage modules anyhow).

    I'll note too that I still have PowerShellGet v3.0.12 installed on some machines and it works fine, so it seems this bug was introduced sometime after that prerelease version.

  5. anamnavi commented on Apr 23, 2024

    @anamnavi
    Member

    TezzKF Daniel Schroeder (@deadlydog) thanks for reporting this issue. We plan to fix this before GA of the module.

  6. added this to the P0 milestone on Aug 6, 2026
  7. alerickson commented on Aug 19, 2026

    @alerickson
    Member

    Following up here, the original issue related to the steppable pipeline seems to no longer be an issue. However there is another bug I encountered, which is that the -Force parameter does not translate to -Reinstall. This isn't a direct translation, but in my opinion users who use -Force also want to reinstall if necessary:

    Image
  8. alerickson commented on Aug 19, 2026

    @alerickson
    Member

    The issue I encountered is also tangentially related to this issue: #47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions