Repository navigation
GetSteppablePipeline RuntimeException #58
Description
Activity
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.1When 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.Same error here when trying to use version 3.0.23-beta23 of PowerShellGet via PowerShellGet installation in PS Core.
Reproduction:
Install-Module PowerShellGet -version "3.0.23-beta23" -AllowPrerelease -Repository PSGallery- Open new PowerShell
Import-Module -Name PowerShellGetGet-Modulelists PowerShellGet in version 3.0.23-beta23Get-PSRepositoryandRegister-PSRepositorythrow 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.0The issue seems related to
$WrappedCmdand 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.
Reacted by Daniel SchroederI 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:PSModulePathand I found the newer PowerShellGet module atC:\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.PSResourceGetand have been updating my scripts to useInstall-PSResourceinstead ofInstall-Module.So the root issue seems to be that
Install-Moduleis broken in PowerShellGet v3.0.23 and the workaround is to either use PowerShellGet 2.2.5 (the last stable version), or update to useMicrosoft.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.
Reacted by Sam ErdeTezzKF Daniel Schroeder (@deadlydog) thanks for reporting this issue. We plan to fix this before GA of the module.
Reacted by Daniel SchroederFollowing 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
-Forceparameter does not translate to-Reinstall. This isn't a direct translation, but in my opinion users who use-Forcealso want to reinstall if necessary:
The issue I encountered is also tangentially related to this issue: #47
Prerequisites
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:
Expected behavior
PowerShellGet installed in version 2.2.5Actual behavior
RuntimeExceptionError details
Environment data
Version
PowerShell version 5.1
Visuals
No response