You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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
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.
Get-Module lists PowerShellGet in version 3.0.23-beta23
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
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.
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:
Activity
TezzKF commentedon Nov 20, 2023
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.
skaempfer commentedon Dec 29, 2023
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 PSGalleryImport-Module -Name PowerShellGetGet-Modulelists PowerShellGet in version 3.0.23-beta23Get-PSRepositoryandRegister-PSRepositorythrow the following error:Environment
LarryWisherMan commentedon Mar 11, 2024
The 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
Not sure if this being phased out - or if the dependency is needed before the prerelease module is used.
deadlydog commentedon Mar 13, 2024
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: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.
anamnavi commentedon Apr 23, 2024
TezzKF Daniel Schroeder (@deadlydog) thanks for reporting this issue. We plan to fix this before GA of the module.
alerickson commentedon Aug 19, 2026
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
-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:alerickson commentedon Aug 19, 2026
The issue I encountered is also tangentially related to this issue: #47